You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This applies only to koa (express and hapi properly return content-type) and is related to this known koa bug koajs/koa#1120 - I've discovered it while working on PR #1129 (#1129 (review))
Sorting
I'm submitting a ...
bug report
feature request
support request
I confirm that I
used the search to make sure that a similar issue hasn't already been submit
Expected Behavior
koa returns custom content-type just like express and hapi currently does
Current Behavior
koa ignores this.setHeader('content-type', 'application/vnd.mycompany.myapp.v2+json'); and returns application/json
Seems like we should obviously fix this, can you open a PR?
how about pushing additional commit that fixes it to the PR #1129 ? this is kind of related and additional benefit is that I can introduce integration tests :)
This applies only to koa (express and hapi properly return
content-type
) and is related to this known koa bug koajs/koa#1120 - I've discovered it while working on PR #1129 (#1129 (review))Sorting
I'm submitting a ...
I confirm that I
Expected Behavior
koa returns custom
content-type
just like express and hapi currently doesCurrent Behavior
koa ignores
this.setHeader('content-type', 'application/vnd.mycompany.myapp.v2+json');
and returnsapplication/json
Possible Solution
as described in koajs/koa#1120 (comment) by @brunoabreu
so the solution is as simple as this:
Steps to Reproduce
koa
as a servercurl
)Context (Environment)
Version of the library:
3.14.0
Version of NodeJS:
v14.17.6
[x] I confirm I've used
yarn
Detailed Description
I think everything was described already
Breaking change?
hard to tell, I guess not
The text was updated successfully, but these errors were encountered: