-
Notifications
You must be signed in to change notification settings - Fork 62
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
SetContentType middleware breaks Content-Type detection for requests #3
Comments
It looks at context, so you can override the Content-Type on specific routes via a middleware. Ie. you could force |
If it is working as intended, it would be good for |
@jayschwa yeah, that would be great. Would you mind submitting a PR? :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The documentation for
SetContentType
only mentions responses and says nothing of requests:However, this breaks Content-Type detection for requests in the
DefaultDecoder
becauseSetContentType
andGetRequestContentType
share the same context key.It's not obvious to me why
GetRequestContentType
even looks at the context, as that seems to betray the function name. But if that behavior is going to stay, I suggest using a separate context key so thatSetContentType
does not interfere.The text was updated successfully, but these errors were encountered: