Closed Matrixbirds closed 7 years ago
Because you have no request content, so it's no point in geting content type. https://github.com/koajs/koa/blob/43a1df8200dad6860f688713a112785535a3ed3d/lib/request.js#L565
oh i got it, thx
I have a question about this. If the request method is get
, so there is no request content. In this situation, should we return null ?
koa/lib/request.js
my app code
my test code
ctx.is("application/json") return null; but actual its header contains{ 'content-type': 'application/json'}