Skip to content

Commit 799ddfb

Browse files
committed
start using PATCH in favor of PUT
1 parent c5cb0e5 commit 799ddfb

6 files changed

Lines changed: 33 additions & 5 deletions

File tree

content/v3.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,34 @@ All timestamps are returned in ISO 8601 format:
3838

3939
YYYY-MM-DDTHH:MM:SSZ
4040

41+
## HTTP Verbs
42+
43+
Where possible, API v3 strives to use appropriate HTTP verbs for each
44+
action.
45+
46+
HEAD
47+
: Can be issued against any resource to get just the HTTP header info.
48+
49+
GET
50+
: Used for retrieving resources.
51+
52+
POST
53+
: Used for creating resources, or performing custom actions (such as
54+
merging a pull request).
55+
56+
PATCH
57+
: Used for updating resources with partial JSON data. For instance, an
58+
Issue resource has `title` and `body` attributes. A PATCH request will
59+
accept just one of the attributes to update the resource. PATCH is a
60+
relatively new and uncommon HTTP verb, so resource endpoints also accept
61+
POST requests.
62+
63+
PUT
64+
: Used for replacing resources or collections.
65+
66+
DELETE
67+
: Used for deleting resources.
68+
4169
## Authentication
4270

4371
There are two ways to authenticate through GitHub API v3:

content/v3/gists.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ including information about data format and authentication.
200200

201201
## Edit a gist
202202

203-
PUT /gists/:id.json
203+
PATCH /gists/:id.json
204204

205205
<pre class="highlight"><code class="language-javascript">
206206
{

content/v3/gists/comments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ title: Gist Comments API v3 | dev.github.com
8989

9090
## Edit
9191

92-
PUT /gists/comments/:id.json
92+
PATCH /gists/comments/:id.json
9393

9494
### Response
9595

content/v3/issues.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ labels
5353

5454
## Edit an Issue
5555

56-
PUT /repos/:user/:repo/issues/:id.json
56+
PATCH /repos/:user/:repo/issues/:id.json
5757

5858
### Input
5959

content/v3/issues/labels.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ title: Issue Labels API v3 | dev.github.com
2727

2828
## Update a Label
2929

30-
PUT /repos/:user/:repo/labels/:id.json
30+
PATCH /repos/:user/:repo/labels/:id.json
3131

3232
### Input
3333

content/v3/issues/milestones.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ state
3838

3939
## Update a Milestone
4040

41-
PUT /repos/:user/:repo/milestones/:id.json
41+
PATCH /repos/:user/:repo/milestones/:id.json
4242

4343
### Input
4444

0 commit comments

Comments
 (0)