3 ms·
From a CLI you run into issues with `nc` and the like supporting https. You can get close with `curl` since it has a -H option that allows you to provide header
by matt_heimer 5y ago
From a CLI you run into issues with `nc` and the like supporting https. You can get close with `curl` since it has a -H option that allows you to provide headers in a file.
curl -v -H @request1.txt neverssl.com
With a request1.txt header file
X-Header: mine
User-Agent: bob
Will generate a request of
> GET / HTTP/1.1
> Host: neverssl.com
> Accept: */*
> X-Header: mine
> User-Agent: bob
You end up needing to know 3 options. -X <METHOD> to specify the HTTP method, -d @<file> if you want to send a request body, and -H.