# wget -O Only Works with HTTP Rsp Code 200



## reddy1226 (Dec 8, 2009)

I am using wget to send a web service SOAP request (POST method) and to capture the response in the file specified via the "wget -O" option. This works fine as long the HTTP status code in the response is 200 (i.e. the SOAP response is captured in the file). However, if the HTTP status code is something else (e.g. 500 - Internal Server Error), the SOAP response in the body is not captured in the -O file. Is there a way to always capture the contents in the body of the response irrespective of the HTTP response code? Any help will be greatly appreciated.... Thanks.


----------

