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

throw http status on content-type missing #7

Open
bredele opened this issue Jun 20, 2017 · 1 comment
Open

throw http status on content-type missing #7

bredele opened this issue Jun 20, 2017 · 1 comment
Labels

Comments

@bredele
Copy link
Contributor

bredele commented Jun 20, 2017

We get the content type using the module content-type

contentType(req).type

This module trigger a TypeError if the content-type does not exist or is not supported. We should use that error to trigger a HTTP MediaType error.

@bredele bredele added the bug label Jun 20, 2017
@bredele
Copy link
Contributor Author

bredele commented Jul 25, 2017

The error code should be 415 however, this should be configurable since it is possible to make a HTTP POST request without content type.

@bredele bredele closed this as completed Jul 25, 2017
@bredele bredele reopened this Jul 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant