Content negociation

When performing requests, you SHOULD provide a Accept header.

For POST, PUT and PATCH requests, you MUST provide the appropriate Content-Type header.

POST http://api.shopping-feed.com/v1/resource HTTP/1.1
Authorization: Bearer da39a3ee5e6b4b0d3255bfef95601890afd80709
Accept: application/json
Content-Type: application/json

{"data":"value"}

Content negociation validation check is performed by the API against Content-Type when the request submit data. If missing or does not fit, the API will invalidate the request and will return an Unsupported Media Type (415) response:

HTTP/1.1 415 Unsupported Media Type
Content-Type: application/problem+json

{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
    "title":"Unsupported Media Type",
    "detail":"Expecting one of the application/json",
    "status":415
}