-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
context.is or request.is return null #440
Comments
looks ok to me if that really is the request at the bottom there, can you reproduce with a small script or in a test? |
Your request actually needs body content. Having body content would mean you should have a Transfer-Encoding header or a Content-Length header, which you are missing. If you are not trying to parse a body, you should instead use the Accept request header and this.request.accepts('json'). |
|
oh yea hahaha good call, missed that |
I have this problem with koa@1.1.2. The request is sent via jQuery : and The request looks like this (note: the actual response is a 302 error page, as |
Hi @yanickrochon there is nothing with those response, as both are correct:
|
@dougwilson hmm... alright for As for |
Make a documentation pull request :) You never mentioned anything about the doc irregularity in your original post, sorry.
You have no
Please open a new issue with your proposal for discussion, and it can certainly be discussed. I didn't see you make any mention in your original post regarding this proposal, sorry. SInce you were posted in an existing issue, I could only assume you were posting something related to the original issue in this thread and not something off-topic, I'm sorry. Please create new issues for the various things. |
nodejs v0.12.2
koa v0.20.0
so ,
if(this.request.is('application/json')||this.is('json')){
is not work ,it return null
but in fidder the request header is
why?
The text was updated successfully, but these errors were encountered: