Skip to content

Commit 66b84d5

Browse files
authored
Merge branch 'main' into repo-sync
2 parents 024702f + df1ae64 commit 66b84d5

10 files changed

Lines changed: 38 additions & 38 deletions

File tree

content/developers/apps/scopes-for-oauth-apps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Check headers to see what OAuth scopes you have, and what the API action accepts
2929

3030
```shell
3131
$ curl -H "Authorization: token OAUTH-TOKEN" {% data variables.product.api_url_pre %}/users/codertocat -I
32-
HTTP/1.1 200 OK
32+
HTTP/2 200
3333
X-OAuth-Scopes: repo, user
3434
X-Accepted-OAuth-Scopes: user
3535
```

content/developers/apps/setting-up-your-development-environment-to-create-a-github-app.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,10 @@ After you click **Install**, look at the output in your Terminal. You should see
371371
```shell
372372
> D, [2018-06-29T15:45:43.773077 #30488] DEBUG -- : ---- received event integration_installation
373373
> D, [2018-06-29T15:45:43.773141 #30488] DEBUG -- : ---- action created
374-
> 192.30.252.44 - - [29/Jun/2018:15:45:43 -0400] "POST / HTTP/1.1" 200 2 0.0067
374+
> 192.30.252.44 - - [29/Jun/2018:15:45:43 -0400] "POST / HTTP/2" 200 2 0.0067
375375
> D, [2018-06-29T15:45:43.833016 #30488] DEBUG -- : ---- received event installation
376376
> D, [2018-06-29T15:45:43.833062 #30488] DEBUG -- : ---- action created
377-
> 192.30.252.39 - - [29/Jun/2018:15:45:43 -0400] "POST / HTTP/1.1" 200 2 0.0019
377+
> 192.30.252.39 - - [29/Jun/2018:15:45:43 -0400] "POST / HTTP/2" 200 2 0.0019
378378
```
379379
380380
This is good news! It means your app received a notification that it was installed on your GitHub account. If you see something like this, your app is running on the server as expected. 🙌

content/developers/overview/secret-scanning.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Create a public, internet accessible HTTP endpoint at the URL you provided to us
5959
##### Example POST sent to your endpoint
6060

6161
```http
62-
POST / HTTP/1.1
62+
POST / HTTP/2
6363
Host: HOST
6464
Accept: */*
6565
Content-Type: application/json
@@ -99,7 +99,7 @@ The code snippets assume you've set an environment variable called `GITHUB_PRODU
9999

100100
**Sample message sent to verify endpoint**
101101
```http
102-
POST / HTTP/1.1
102+
POST / HTTP/2
103103
Host: HOST
104104
Accept: */*
105105
content-type: application/json

content/developers/webhooks-and-events/github-event-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The event objects returned from the Events API endpoints have the same structure
4545
This example shows the format of the [WatchEvent](#watchevent) response when using the [Events API](/rest/reference/activity#events).
4646

4747
```
48-
HTTP/1.1 200 OK
48+
HTTP/2 200
4949
Link: <https://api.github.com/resource?page=2>; rel="next",
5050
<https://api.github.com/resource?page=5>; rel="last"
5151
```

content/developers/webhooks-and-events/webhook-events-and-payloads.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Also, the `User-Agent` for the requests will have the prefix `GitHub-Hookshot/`.
6161
#### Example delivery
6262

6363
```shell
64-
> POST /payload HTTP/1.1
64+
> POST /payload HTTP/2
6565

6666
> Host: localhost:4567
6767
> X-GitHub-Delivery: 72d3162e-cc78-11e3-81ab-4c9367dc0958{% if enterpriseServerVersions contains currentVersion or currentVersion == "github-ae@latest" %}

content/github/authenticating-to-github/about-anonymized-image-urls.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ If an image is showing up in your browser but not on {% data variables.product.p
3737
2. Request the image headers using `curl`.
3838
```shell
3939
$ curl -I https://www.my-server.com/images/some-image.png
40-
> HTTP/1.1 200 OK
40+
> HTTP/2 200
4141
> Date: Fri, 06 Jun 2014 07:27:43 GMT
4242
> Expires: Sun, 06 Jul 2014 07:27:43 GMT
4343
> Content-Type: image/x-png
@@ -60,7 +60,7 @@ If you changed an image recently and it's showing up in your browser but not {%
6060
2. Request the image headers using `curl`.
6161
```shell
6262
$ curl -I https://www.my-server.com/images/some-image.png
63-
> HTTP/1.1 200 OK
63+
> HTTP/2 200
6464
> Expires: Fri, 01 Jan 1984 00:00:00 GMT
6565
> Content-Type: image/png
6666
> Content-Length: 2339

content/rest/guides/getting-started-with-the-rest-api.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Mmmmm, tastes like [JSON][json]. Let's add the `-i` flag to include headers:
5858
```shell
5959
$ curl -i https://api.github.com/users/defunkt
6060
61-
> HTTP/1.1 200 OK
61+
> HTTP/2 200
6262
> Server: GitHub.com
6363
> Date: Sun, 11 Nov 2012 18:43:28 GMT
6464
> Content-Type: application/json; charset=utf-8
@@ -261,7 +261,7 @@ Next, let's fetch our newly created repository:
261261
```shell
262262
$ curl -i {% data variables.product.api_url_pre %}/repos/pengwynn/blog
263263
264-
> HTTP/1.1 404 Not Found
264+
> HTTP/2 404
265265
266266
> {
267267
> "message": "Not Found"
@@ -312,7 +312,7 @@ time taking note of the response headers:
312312
```shell
313313
$ curl -i {% data variables.product.api_url_pre %}/repos/rails/rails/issues
314314
315-
> HTTP/1.1 200 OK
315+
> HTTP/2 200
316316
317317
> ...
318318
> Link: &lt;{% data variables.product.api_url_pre %}/repositories/8514/issues?page=2&gt;; rel="next", &lt;{% data variables.product.api_url_pre %}/repositories/8514/issues?page=30&gt;; rel="last"
@@ -343,7 +343,7 @@ $ "labels": ["design"] \
343343
$ }' \
344344
$ {% data variables.product.api_url_pre %}/repos/pengwynn/api-sandbox/issues
345345
346-
> HTTP/1.1 201 Created
346+
> HTTP/2 201
347347
> Location: {% data variables.product.api_url_pre %}/repos/pengwynn/api-sandbox/issues/17
348348
> X-RateLimit-Limit: 5000
349349
@@ -396,7 +396,7 @@ first call we made to get defunkt's profile:
396396
```shell
397397
$ curl -i {% data variables.product.api_url_pre %}/users/defunkt
398398
399-
> HTTP/1.1 200 OK
399+
> HTTP/2 200
400400
> ETag: "bfd85cbf23ac0b0c8a29bee02e7117c6"
401401
```
402402
@@ -409,7 +409,7 @@ we can tell the API to give us the resource again, only if it has changed:
409409
$ curl -i -H 'If-None-Match: "bfd85cbf23ac0b0c8a29bee02e7117c6"' \
410410
$ {% data variables.product.api_url_pre %}/users/defunkt
411411
412-
> HTTP/1.1 304 Not Modified
412+
> HTTP/2 304
413413
```
414414
415415
The `304` status indicates that the resource hasn't changed since the last time

content/rest/overview/media-types.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ for the `X-GitHub-Media-Type` header:
5353

5454
```shell
5555
$ curl {% data variables.product.api_url_pre %}/users/technoweenie -I
56-
> HTTP/1.1 200 OK
56+
> HTTP/2 200
5757
> X-GitHub-Media-Type: github.v3
5858

5959
$ curl {% data variables.product.api_url_pre %}/users/technoweenie -I \
6060
$ -H "Accept: application/vnd.github.full+json"
61-
> HTTP/1.1 200 OK
61+
> HTTP/2 200
6262
> X-GitHub-Media-Type: github.v3; param=full; format=json
6363

6464
$ curl {% data variables.product.api_url_pre %}/users/technoweenie -I \
6565
$ -H "Accept: application/vnd.github.v3.full+json"
66-
> HTTP/1.1 200 OK
66+
> HTTP/2 200
6767
> X-GitHub-Media-Type: github.v3; param=full; format=json
6868
```
6969

content/rest/overview/resources-in-the-rest-api.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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
203203
1. 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
210210
2. 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
218218
3. 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)
396396
If 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.
442442
If 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
548548
Access-Control-Allow-Origin: *
549549
Access-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
557557
Access-Control-Allow-Origin: *
558558
Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-GitHub-OTP, X-Requested-With
559559
Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE

content/rest/reference/activity.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ Events are optimized for polling with the "ETag" header. If no new events have b
2424

2525
``` shell
2626
$ curl -I {% data variables.product.api_url_pre %}/users/tater/events
27-
> HTTP/1.1 200 OK
27+
> HTTP/2 200
2828
> X-Poll-Interval: 60
2929
> ETag: "a18c3bded88eb5dbb5c849a489412bf3"
3030

3131
# The quotes around the ETag value are important
3232
$ curl -I {% data variables.product.api_url_pre %}/users/tater/events \
3333
$ -H 'If-None-Match: "a18c3bded88eb5dbb5c849a489412bf3"'
34-
> HTTP/1.1 304 Not Modified
34+
> HTTP/2 304
3535
> X-Poll-Interval: 60
3636
```
3737

@@ -56,7 +56,7 @@ To get a feed in Atom format, you must specify the `application/atom+xml` type i
5656
#### Response
5757

5858
```shell
59-
HTTP/1.1 200 OK
59+
HTTP/2 200
6060
```
6161

6262
```xml
@@ -122,14 +122,14 @@ Notifications are optimized for polling with the `Last-Modified` header. If the
122122
``` shell
123123
# Add authentication to your requests
124124
$ curl -I {% data variables.product.api_url_pre %}/notifications
125-
HTTP/1.1 200 OK
125+
HTTP/2 200
126126
Last-Modified: Thu, 25 Oct 2012 15:16:27 GMT
127127
X-Poll-Interval: 60
128128

129129
# Pass the Last-Modified header exactly
130130
$ curl -I {% data variables.product.api_url_pre %}/notifications
131131
$ -H "If-Modified-Since: Thu, 25 Oct 2012 15:16:27 GMT"
132-
> HTTP/1.1 304 Not Modified
132+
> HTTP/2 304
133133
> X-Poll-Interval: 60
134134
```
135135

0 commit comments

Comments
 (0)