You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "Accept" header field can be used by user agents to specify response media types that are acceptable.
However, when requesting the JSON-HOME resource and setting the Accept: application/json-home header , the server returns a 404 error because it does not process well the header.
But when using the Content-Type: application/json-home header, the server correctly returns the JSON-HOME resource with the correct content type.
The "Content-Type" header field indicates the media type of the associated representation…
Where the "representation" is the payload of the message (request or response).
So the Content-Type header should not be used in the request to specify the server about the media type to return. The Accept header should be used instead.
The text was updated successfully, but these errors were encountered:
According to the RFC 7231, section 5.3.2:
However, when requesting the JSON-HOME resource and setting the
Accept: application/json-home
header , the server returns a404
error because it does not process well the header.But when using the
Content-Type: application/json-home
header, the server correctly returns the JSON-HOME resource with the correct content type.In the RFC 7231, section 3.1.1.5:
Where the "representation" is the payload of the message (request or response).
So the
Content-Type
header should not be used in the request to specify the server about the media type to return. TheAccept
header should be used instead.The text was updated successfully, but these errors were encountered: