@@ -35,7 +35,7 @@ sent and received as JSON.
3535``` shell
3636$ curl -I {% data variables.product.api_url_pre %}/users/octocat/orgs
3737
38- > HTTP/1.1 200 OK
38+ > HTTP/2 200
3939> Server: nginx
4040> Date: Fri, 12 Oct 2012 23:33:14 GMT
4141> Content-Type: application/json; charset=utf-8
@@ -139,7 +139,7 @@ Authenticating with invalid credentials will return `401 Unauthorized`:
139139
140140` ` ` shell
141141$ curl -I {% data variables.product.api_url_pre %} -u foo:bar
142- > HTTP/1.1 401 Unauthorized
142+ > HTTP/2 401
143143
144144> {
145145> " message" : " Bad credentials" ,
@@ -154,7 +154,7 @@ the API will temporarily reject all authentication attempts for that user
154154` ` ` shell
155155$ curl -i {% data variables.product.api_url_pre %} -u {% if currentVersion == " free-pro-team@latest" or currentVersion == " github-ae@latest" %}
156156-u < em> valid_username< /em> :< em> valid_token< /em> {% endif %}{% if enterpriseServerVersions contains currentVersion %}-u < em> valid_username< /em> :< em> valid_password< /em> {% endif %}
157- > HTTP/1.1 403 Forbidden
157+ > HTTP/2 403
158158> {
159159> " message" : " Maximum number of login attempts exceeded. Please try again later." ,
160160> " documentation_url" : " {% data variables.product.doc_url_pre %}"
@@ -202,23 +202,23 @@ receive request bodies:
202202
2032031. Sending invalid JSON will result in a ` 400 Bad Request` response.
204204
205- HTTP/1.1 400 Bad Request
205+ HTTP/2 400
206206 Content-Length: 35
207207
208208 {" message" :" Problems parsing JSON" }
209209
2102102. Sending the wrong type of JSON values will result in a ` 400 Bad
211211 Request` response.
212212
213- HTTP/1.1 400 Bad Request
213+ HTTP/2 400
214214 Content-Length: 40
215215
216216 {" message" :" Body should be a JSON object" }
217217
2182183. Sending invalid fields will result in a ` 422 Unprocessable Entity`
219219 response.
220220
221- HTTP/1.1 422 Unprocessable Entity
221+ HTTP/2 422
222222 Content-Length: 149
223223
224224 {
@@ -373,7 +373,7 @@ The returned HTTP headers of any API request show your current rate limit status
373373
374374` ` ` shell
375375$ curl -I {% data variables.product.api_url_pre %}/users/octocat
376- > HTTP/1.1 200 OK
376+ > HTTP/2 200
377377> Date: Mon, 01 Jul 2013 17:27:06 GMT
378378> X-RateLimit-Limit: 60
379379> X-RateLimit-Remaining: 56
@@ -396,7 +396,7 @@ new Date(1372700873 * 1000)
396396If you exceed the rate limit, an error response returns:
397397
398398```shell
399- > HTTP/1.1 403 Forbidden
399+ > HTTP/2 403
400400> Date: Tue, 20 Aug 2013 14:50:41 GMT
401401> X-RateLimit-Limit: 60
402402> X-RateLimit-Remaining: 0
@@ -416,7 +416,7 @@ If your OAuth application needs to make unauthenticated calls with a higher rate
416416
417417```shell
418418$ curl -u my_client_id:my_client_secret {% data variables.product.api_url_pre %}/user/repos
419- > HTTP/1.1 200 OK
419+ > HTTP/2 200
420420> Date: Mon, 01 Jul 2013 17:27:06 GMT
421421> X-RateLimit-Limit: 5000
422422> X-RateLimit-Remaining: 4966
@@ -442,7 +442,7 @@ Abuse rate limits are not intended to interfere with legitimate use of the API.
442442If your application triggers this rate limit, you' ll receive an informative response:
443443
444444```shell
445- > HTTP/1.1 403 Forbidden
445+ > HTTP/2 403
446446> Content-Type: application/json; charset=utf-8
447447> Connection: close
448448
@@ -502,7 +502,7 @@ whenever possible.
502502
503503` ` ` shell
504504$ curl -I {% data variables.product.api_url_pre %}/user
505- > HTTP/1.1 200 OK
505+ > HTTP/2 200
506506> Cache-Control: private, max-age=60
507507> ETag: " 644b5b0155e6404a9cc4bd9d8b1ae730"
508508> Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT
@@ -512,7 +512,7 @@ $ curl -I {% data variables.product.api_url_pre %}/user
512512> X-RateLimit-Reset: 1372700873
513513
514514$ curl -I {% data variables.product.api_url_pre %}/user -H ' If-None-Match: "644b5b0155e6404a9cc4bd9d8b1ae730"'
515- > HTTP/1.1 304 Not Modified
515+ > HTTP/2 304
516516> Cache-Control: private, max-age=60
517517> ETag: " 644b5b0155e6404a9cc4bd9d8b1ae730"
518518> Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT
@@ -522,7 +522,7 @@ $ curl -I {% data variables.product.api_url_pre %}/user -H 'If-None-Match: "644b
522522> X-RateLimit-Reset: 1372700873
523523
524524$ curl -I {% data variables.product.api_url_pre %}/user -H " If-Modified-Since: Thu, 05 Jul 2012 15:31:30 GMT"
525- > HTTP/1.1 304 Not Modified
525+ > HTTP/2 304
526526> Cache-Control: private, max-age=60
527527> Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT
528528> Vary: Accept, Authorization, Cookie
@@ -544,7 +544,7 @@ Here's a sample request sent from a browser hitting
544544
545545```shell
546546$ curl -I {% data variables.product.api_url_pre %} -H "Origin: http://example.com"
547- HTTP/1.1 302 Found
547+ HTTP/2 302
548548Access-Control-Allow-Origin: *
549549Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
550550```
@@ -553,7 +553,7 @@ This is what the CORS preflight request looks like:
553553
554554```shell
555555$ curl -I {% data variables.product.api_url_pre %} -H "Origin: http://example.com" -X OPTIONS
556- HTTP/1.1 204 No Content
556+ HTTP/2 204
557557Access-Control-Allow-Origin: *
558558Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-GitHub-OTP, X-Requested-With
559559Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE
0 commit comments