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
I'm using the CurlTransport, so maybe it's related to my cURL version.
I needed to make a post request to a API without body params, and the server responded with 400 status code.
It seems that HTTP POST requests requires a Content-Length header.
To overcome the problem, I sent a empty string as data:
I'm using the CurlTransport, so maybe it's related to my cURL version.
I needed to make a post request to a API without body params, and the server responded with 400 status code.
It seems that HTTP POST requests requires a
Content-Length
header.To overcome the problem, I sent a empty string as data:
But it smells like a workaround to me :) .
I think it can be automatically set when preparing the request, to avoid the cURL bug.
Additional info:
cURL version: 7.29.0
PHP: 7.1.13
The text was updated successfully, but these errors were encountered: