1

I want this request:

GET http://localhost:9999 HTTP/1.1
Accept: */*
Host: example.com

How can I get this with curl? This would require to set the Host and requested URI individually, but I only know the curl host/uri notation...

4

You can set additional headers with curl using the -H option:

curl -H 'Host: example.com' -H 'Accept: */*' http://localhost:9999
| improve this answer | |

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.