Skip to content

Commit

Permalink
Clarify parameter usage
Browse files Browse the repository at this point in the history
  • Loading branch information
pengwynn committed Sep 9, 2012
1 parent b682b5c commit 3773081
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions content/v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,29 @@ All timestamps are returned in ISO 8601 format:

YYYY-MM-DDTHH:MM:SSZ

## Parameters

Many API methods take optional parameters. For GET requests, any parameters not
specified as a segment in the path can be passed as an HTTP query string
parameter:

<pre class="terminal">
$ curl -i "https://api.github.com/repos/mojombo/jekyll/issues?state=closed"
</pre>

In this example, the 'mojombo' and 'jekyll' values are provided for the `:user`
and `:repo` parameters in the path while `:state` is passed in the query
string.

For POST requests, parameters not included in the URL should be encoded as JSON
with a Content-Type of 'application/x-www-form-urlencoded':

<pre class="terminal">
$ curl -i -u username -d '{"scopes":["public_repo"]}' https://api.github.com/authorizations
</pre>



## Client Errors

There are three possible types of client errors on API calls that
Expand Down

0 comments on commit 3773081

Please sign in to comment.