You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/guides/best-practices-for-integrators.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,29 +41,29 @@ Users can dig into the server responses you send back to GitHub. Ensure that you
41
41
42
42

43
43
44
-
###Follow any redirects that the API sends you
44
+
## Follow any redirects that the API sends you
45
45
46
46
GitHub is explicit in telling you when a resource has moved by providing a redirect status code. You should follow these redirections. Every redirect response sets the `Location` header with the new URI to go to. If you receive a redirect, it's best to update your code to follow the new URI, in case you're requesting a deprecated path that we might remove.
47
47
48
48
We've provided [a list of HTTP status codes](/v3/#http-redirects) to watch out for when designing your app to follow redirects.
49
49
50
-
###Don't manually parse URLs
50
+
## Don't manually parse URLs
51
51
52
52
Often, API responses contain data in the form of URLs. For example, when requesting a repository, we'll send a key called `clone_url` with a URL you can use to clone the repository.
53
53
54
54
For the stability of your app, you shouldn't try to parse this data or try to guess and construct the format of future URLs. Your app is liable to break if we decide to change the URL.
55
55
56
56
For example, when working with paginated results, it's often tempting to construct URLs that append `?page=<number>` to the end. Avoid that temptation. [Our guide on pagination](/guides/traversing-with-pagination) offers some safe tips on dependably following paginated results.
57
57
58
-
###Dealing with rate limits
58
+
## Dealing with rate limits
59
59
60
60
The GitHub API [rate limit](/v3/#rate-limiting) ensures that the API is fast and available for everyone.
61
61
62
62
If you hit a rate limit, it's expected that you back off from making requests and try again later when you're permitted to do so. Failure to do so may result in the banning of your app.
63
63
64
64
You can always [check your rate limit status](/v3/rate_limit/) at any time. Checking your rate limit incurs no cost against your rate limit.
65
65
66
-
###Dealing with API errors
66
+
## Dealing with API errors
67
67
68
68
Although your code would never introduce a bug, you may find that you've encountered successive errors when trying to access the API.
0 commit comments