Content-Type:application/x-www-form-urlencoded is ignored.
xoss opened this issue · comments
xoss commented
Hello everyone. It seems for me, that http-prompt somehow ignores Content-Type: application/x-www-form-urlencoded
. Even though httpie
preview returns the right command
http --form --proxy=https://localhost:9999 --verbose --verify=no http://example.com password=bar username=foo Content-Type:application/x-www-form-urlencoded
the actual request treats the body to be json
http://example.com> post
POST / HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 38
Content-Type: application/x-www-form-urlencoded
Host: example.com
User-Agent: HTTPie/2.0.0
{"password": "bar", "username": "foo"}
Whereas, when running the httpie
command directly on the shell, it's interpreted correctly
$ http --form --proxy=https://localhost:9999 --verbose --verify=no http://example.com password=bar username=foo Content-Type:application/x-www-form-urlencoded
POST / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 25
Content-Type: application/x-www-form-urlencoded
Host: example.com
User-Agent: HTTPie/2.0.0
password=bar&username=foo
Has someone experienced this issue so far as well? Was browsing the reported issues, but couldn't find something related.