Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seed support for Json-Home does not support Accept header #225

Open
Magador opened this issue Jan 31, 2017 · 0 comments
Open

Seed support for Json-Home does not support Accept header #225

Magador opened this issue Jan 31, 2017 · 0 comments

Comments

@Magador
Copy link

Magador commented Jan 31, 2017

According to the RFC 7231, section 5.3.2:

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.

In the RFC 7231, section 3.1.1.5:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant