Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Correct mime-type for JSON? #2

Closed
SimonDegraeve opened this issue Aug 14, 2015 · 4 comments
Closed

Correct mime-type for JSON? #2

SimonDegraeve opened this issue Aug 14, 2015 · 4 comments

Comments

@SimonDegraeve
Copy link
Contributor

I noticed the middleware returns JSON with text/json mime-type. Any reason why it doesn't return application/json?
I know there is a debate about that for a long time in the community but I thought application/json became the norm.

@SimonDegraeve
Copy link
Contributor Author

I mean I don't really mind, just curious since I am working on a hapi version of a GraphQL server, I don't like to blindly transform someone else work.
See hapi-graphql.

@fson
Copy link

fson commented Aug 15, 2015

@SimonDegraeve I believe that's by mistake, as the accepted content-type for the request body is application/json (

case 'application/json':
).

@SimonDegraeve
Copy link
Contributor Author

Indeed, that would make sense...
Do you have any feedback on the Hapi port?

@leebyron
Copy link
Contributor

Thanks for finding this! Indeed it's a bug. application/json is intended

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants