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

Add quality factors to content negotiation #1059

Open
ThijsBroersen opened this issue Jan 3, 2019 · 2 comments
Open

Add quality factors to content negotiation #1059

ThijsBroersen opened this issue Jan 3, 2019 · 2 comments

Comments

@ThijsBroersen
Copy link

ThijsBroersen commented Jan 3, 2019

As a user I would also like quality factors within an Accept-header to be respected.
E.g.

Input
  .get("/test")
  .withHeaders("Accept" -> "text/plain;q=0.3,application/json;q=0.9")

Currently the quality factors are ignored.

@vkostyukov
Copy link
Collaborator

@ThijsBroersen Thanks for the ticket!

Not sure I follow the first part about being a multi-value. This should be supported (only qualities are ignored) and if not, it's a bug. Mind providing more details on this?

@ThijsBroersen ThijsBroersen changed the title Support a multi-valued Accept-header and add quality factors to content negotiation Add quality factors to content negotiation Jan 3, 2019
@ThijsBroersen
Copy link
Author

ThijsBroersen commented Jan 3, 2019

@vkostyukov you are correct, it takes the first Content-Type that matches any value from the Accept-header. And when no match is found it returns the last Content-Type of a coproduct.
My tests were a bit off...

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

No branches or pull requests

2 participants