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

Content negotiation #292

Open
wants to merge 1 commit into
base: 3.0.x
Choose a base branch
from
Open

Content negotiation #292

wants to merge 1 commit into from

Conversation

ptahchiev
Copy link

Hello,

I'd like to be able to negotiate with the server the content type of the response I'm receiving. At the moment no matter what type of Accept header I send, anything different from application/json or application/hal+json returns 406. I have registered some extra HttpMessageConverters in my RepositoryRestConfigurerAdapter:configureHttpMessageConverters, but unless I comment the following 2 lines in RepositoryRestHandlerMapping it just doesn't work.

The two lines in RepositoryRestHandlerMapping add fallback media types to be application/json and application/hal+json and the code simply doesn't care of what one has specified in their Accept header.

Commenting those two lines makes it work fine. I'm not sure what their purpose was or if they are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants