Changes

stoney core: REST API

367 bytes added, 11:20, 29 January 2014
/* Data interchange format */
|<pre>
Accept: application/json
Accept-Charset: UTFutf-8
</pre>
| <pre>Content-Type: application/json; charset=UTF-8</pre>
* If the client sends an <code>Accept</code> header with an unsupported value (at the moment only <code>application/json</code> is supported), the service will respond with a <code>406</code> (Not Acceptable) [[#Error codes and responses|error code]].
* If the client sends an <code>Accept-Charset</code> header with an unsupported value (at the moment only <code>utf-8</code> is supported), the service will respond with a <code>406</code> (Not Acceptable) [[#Error codes and responses|error code]].
* If no <code>Accept</code> header is sent, the server will use JSON, possibly pretty-printed and annotated.
* If no <code>Accept-Charset</code> header is sent, the server send the response with <code>utf-8</code> as charset.
* If the client sends a <code>Content-Type</code> other than <code>application/json</code> on a POST, PUT or PATCH request, the service will respond with a <code>415</code> (Unsupported Media Type) [[#Error codes and responses|error code]].
* If the client sends invalid JSON, the service will response with a <code>400</code> (Bad Request) HTTP [[#Error codes and responses|error code]] and a descriptive error message within the error object.
SLB
385
edits