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
Problem with setting Content-Type #1311
Comments
When you are using the |
2.50.0 Aha, so how can I then post json? |
Send it via Your problem might be related to this bug as well #1310, so in any case try your tests with v2.49.0 as well. |
@domwoe 2.51.0 is out, let us know what's the status with your issue. |
2.51.0 works for me, while 2.50.0 didn't. Thanks. |
I set also options.form to be an object with my payload and use the request.post method.
But this is what I get as a response (deleted the private parts):
{"statusCode":415,"body":"","headers":{"date":"Wed, 10 Dec 2014 13:33:19 GMT","content-length":"0","connection":"close","content-type":"text/plain; charset=UTF-8","content-language":"en"},"request":{"uri":{"protocol":"https:","slashes":true,"auth":null,"host":"","port":443,"hostname":"","hash":null,"search":null,"query":null,"pathname":"","path":"","href":""},"method":"POST","headers":{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36","Authorization":"","Accept-Encoding":"application/json","_Content-Type":"application/x-www-form-urlencoded_","content-length":41}}}
So it seems that the Content-Type is not set to application/json and this is why I get a 415.
What is the problem here?
The text was updated successfully, but these errors were encountered: