sphinxcontrib.httpdomain
— Documenting RESTful HTTP APIs¶
Directives¶
Sourcecode¶
GET /users/123/posts/web HTTP/1.1
Host: example.com
Accept: application/json, text/javascript
HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript
[
{
"post_id": 12345,
"author_id": 123,
"tags": ["server", "web"],
"subject": "I tried Nginx"
},
{
"post_id": 12346,
"author_id": 123,
"tags": ["html5", "standards", "web"],
"subject": "We go to HTML 5"
}
]
Resource fields¶
Options¶
Roles¶
Referring to existing directives¶
:http:patch:`/users/(int:user_id)/posts/(tag)`
:http:options:`/users/(int:user_id)/posts/(tag)`
:http:get:`/users/(int:user_id)/posts/(tag)`
:http:head:`/users/(int:user_id)/posts/(tag)`
:http:post:`/users/(int:user_id)/posts/(tag)`
:http:put:`/users/(int:user_id)/posts/(tag)`
:http:delete:`/users/(int:user_id)/posts/(tag)`
Here be Errors!¶
A request with method :http:method:`foo` followed by :http:header:`bar` and :http:header:`x-baz` headers receives response with :http:statuscode:`42 Answer` status code.