I wanted to send a request with "Transfer-Encoding:chunked" but somehow the header is never set.
Below is my code for testing and the corresponding captured request.
POST /test.php HTTP/1.1
Host: [replaced]
User-Agent: python-requests/2.28.1
Accept-Encoding: gzip, deflate, br
Accept: /
Connection: close
Content-Length: 12
7
param=2
If I do not set the "Transfer-Encoding" header it is not used and even if I explicitly set the "Transfer-Encoding" header it is not used. The requests library always seems to put a "Content-Length" instead.
My goal is to form this request:
POST /test.php HTTP/1.1
Host: [replaced]
Transfer-Encoding: chunked
Content-Type: application/x-www-form-urlencoded
I wanted to send a request with "Transfer-Encoding:chunked" but somehow the header is never set. Below is my code for testing and the corresponding captured request.
If I do not set the "Transfer-Encoding" header it is not used and even if I explicitly set the "Transfer-Encoding" header it is not used. The requests library always seems to put a "Content-Length" instead. My goal is to form this request: