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
wget can't do this, but this should work:
curl -R -O http://stackoverflow.com/xxx
Also see https://superuser.com/questions/253826/how-to-use-wget-to-download-http-error-pages
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With