0

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?

1
stackoverflow.com/questions

= GET /questions

stackoverflow.com/87whjjgaas.asd

= GET /87whjjgaas.asd

23.123.123.123/questions

= GET /questions

for

curl -X GET -H "User-Agent: curl/7.29.0" -H "Host: stackoverflow.com" -H "Accept: /" 198.252.206.16

Answer is

curl -X GET -H "User-Agent: curl/7.29.0" -H "Host: stackoverflow.com" -H "Accept: /" 198.252.206.16/questions

:)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.