Tuesday, 18 September 2012

wget HEAD request?

I wanted  to send HTTP HEAD request using wget, is it possible I wondered?

No as it's not wget, but you can do that quite easily by using curl.
curl -I http://www.superuser.com/
Produces this output:
HTTP/1.1 301 Moved Permanently                        
Content-Length: 144                       
Content-Type: text/html; charset=UTF-8     
Location: http://superuser.com/
Date: Sat, 09 Oct 2010 19:11:50 GMT
 
Thanks superuser.com!

No comments:

Post a Comment