I'm trying to URL encode query parameters using curl with --data-urlencode but they end up being appended to the query like with --data.
The issue can be reproduced with the help of netcat and doing queries against it.
Example curl POST query:
curl --data-urlencode "foo=bar" 127.0.0.1:8080/test/path
Actual output:
$ nc -l 8080
POST /test/path HTTP/1.1
Host: 127.0.0.1:8080
User-Agent: curl/7.58.0
Accept: */*
Content-Length: 7
Content-Type: application/x-www-form-urlencoded
foo=bar
Expected output:
$ nc -l 8080
POST /test/path?foo=bar HTTP/1.1
Host: 127.0.0.1:8080
User-Agent: curl/7.58.0
Accept: */*