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

Forcing api mime type ? #76

Closed
waghanza opened this issue Oct 31, 2018 · 1 comment
Closed

Forcing api mime type ? #76

waghanza opened this issue Oct 31, 2018 · 1 comment

Comments

@waghanza
Copy link

waghanza commented Oct 31, 2018

Hi @kocsismate,

jsonapi specs define the mime type application/vnd.api+json.

It could be interesting to force consumer to use this mime type, I mean return an HTTP 406 if not.

It let the developer use an other response formalism, for example msgpack ...

What do you think ?

Regards,

@kocsismate
Copy link
Member

Hi @waghanza,

Yes, Yin has this feature: https://github.com/woohoolabs/yin#content-negotiation.

But if you'd like to "hack" the spec, and use msgpack or any other format besides JSON, you are also equipped with necessary tools: https://github.com/woohoolabs/yin#custom-serialization

@waghanza waghanza changed the title Forcing api meme type ? Forcing api mime type ? Nov 5, 2018
@waghanza waghanza closed this as completed Nov 5, 2018
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