Is there a shell command to see the headers of a HTTP request?
For example, I would like to know what the headers retrieved from www.example.com/test.php are
How can I do this?
|
Is there a shell command to see the headers of a HTTP request? For example, I would like to know what the headers retrieved from How can I do this? | ||||
|
feedback
|
|
In order to retrieve only the header, give this a try:
From the
| |||
|
feedback
|
|
Use wget for instance
| |||||||||
feedback
|
|
You can do that with curl:
Result:
(for some reason, IANA decided to redirect example.com, result: no body) curls manual page about the
| |||
|
feedback
|
|
Or you can use 200 OK Connection: close Date: Sun, 20 Mar 2011 19:08:58 GMT Server: Apache/2.2.3 (CentOS) Content-Length: 2945 Content-Type: text/html; charset=UTF-8 Last-Modified: Wed, 09 Feb 2011 17:13:15 GMT Client-Date: Sun, 20 Mar 2011 19:09:08 GMT Client-Peer: 192.0.32.8:80 Client-Response-Num: 1 | |||
|
feedback
|