I cannot find a switch in wget which would allow me to see the body of the response if the server returns a status other than 200 OK.
For example
wget 'http://stackoverflow.com/xxx'
will result in
--2012-02-08 16:38:32-- http://stackoverflow.com/xxx
Resolving stackoverflow.com... 64.34.119.12
Connecting to stackoverflow.com|64.34.119.12|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2012-02-08 16:38:32 ERROR 404: Not Found.
Is it possible access the html document which stackoverflow returns for 404 error?
I know curl would do it, the question is how to do it with wget.
Thanks
Tymek
wgetcan’t do this, but this should work:Also see https://superuser.com/questions/253826/how-to-use-wget-to-download-http-error-pages