Using output from the command below,
% curl -v stackoverflow.com/questions
* About to connect() to stackoverflow.com port 80 (#0)
* Trying 198.252.206.16...
* Connected to stackoverflow.com (198.252.206.16) port 80 (#0)
> GET /questions HTTP/1.1
> User-Agent: curl/7.29.0
> Host: stackoverflow.com
> Accept: */*
I could do curl -X GET -H "User-Agent: curl/7.29.0" -H "Host: stackoverflow.com" -H "Accept: */*" 198.252.206.16
to replicate the request but how do I specify the GET /questions
in my command?
= GET /questions
= GET /87whjjgaas.asd
= GET /questions
for
Answer is
:)
I needed to see how server behaved with certain "wrong" paths. To stop curl from normalizing a path, there is the
--path-as-is
option.