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

Documentation for handling alternative accept headers #55

Open
igorlev opened this issue Mar 13, 2017 · 2 comments
Open

Documentation for handling alternative accept headers #55

igorlev opened this issue Mar 13, 2017 · 2 comments

Comments

@igorlev
Copy link

igorlev commented Mar 13, 2017

Featherbed currently ships with an existing typelevel specification of a JSON encoder for an "application/json" content type.

It would be helpful to include some documentation for handling alternative specifications such as "application/vnd.somevendor+json; version=1" (as opposed to non-JSON content type encodings such as "text/xml").

@jeremyrsmith
Copy link
Collaborator

@igorlev I'm actually not sure that could be supported as-is right now - currently we extract the base content type (without the ; arguments, in that case application/vnd.somevender+json and that's the content type that's used.

I'd welcome a PR for it, though!

@igorlev
Copy link
Author

igorlev commented Mar 13, 2017

Hmm, just noticed that the extracted content-type (used for decoder matching) does in fact drop the ;version=1 portion.

I might be missing something, but is there already documentation for adding the alternate content-type while still reusing the same circe JSON decoder?

As I understand more of the code base might try contributing the fix for the version drop.

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

2 participants