featherbed
featherbed copied to clipboard
Documentation for handling alternative accept headers
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"
).
@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!
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.