-
Notifications
You must be signed in to change notification settings - Fork 153
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
how do you override Content-Type / Accept headers? #13
Comments
I'm having the same problem. I think this is where the checking is done https://github.com/miLibris/flask-rest-jsonapi/blob/master/flask_rest_jsonapi/decorators.py Not sure how to proceed from here. |
it also appears hardcoded here: https://github.com/miLibris/flask-rest-jsonapi/blob/master/flask_rest_jsonapi/resource.py |
The content-type and accept headers are related to the jsonapi 1.0 specification so i have not planned to make it configurable but you can try to override it via decorators |
JSONAPI 1.0 specification says: “Clients that include the JSON API media type in their Accept header MUST specify the media type there at least once without any media type parameters.” That means, that there may be other acceptable MIME types, which the string comparison that was in place before prevented. This should also help with issue miLibris#13.
I am trying to write an API receiver, where I can not control the other end. The other end only allows headers 'Accept: application/json' and 'Content-Type: application/json'
What is the fastest way to accept and return application/json in the headers?
The text was updated successfully, but these errors were encountered: