Skip to content

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