Closed cedricbonhomme closed 1 year ago
Hi,
thank you for your question. I've looked at the JSON API specs and there is a little bit a of a gray area about the Accept
header
https://jsonapi.org/format/#content-negotiation-clients
On one hand it says:
Servers MUST respond with a 406 Not Acceptable
status code if a request’s Accept header contains the JSON:API media type and all instances of that media type are modified with media type parameters.
but it does not say what server should do if request does not have Accept
header at all (and so no 'media type parameters')
Seems like other people are also confused: https://discuss.jsonapi.org/t/content-type-accept-header-error-responses/1667
I'll try to clarify what is correct server response should be if Accept
header is not present, but it looks like it should not be required. Thought it does require Content-Type: application/vnd.api+json
thank you for your answer.
Actually I never had do do this, in my whole life ;-)
But thanks, I wait for your clarification.
First want to thank you for this fork. I am using Flask-Restless since years. And it seems that finally there is a good candidate as replacement. Thank you for this.
I have a small question about this the example below. Could explain me why ? Is it a good practice or something ?
Cheers,
Cédric