Reputation: 261
I want to use the Indy IdHTTP component to fetch two web sites and compare them. Is it possible to use Indy to download the webpage source, even with 404 or any >200 error is found? So if there is any text on the page, no matter if there is any error, I want to download it.
Upvotes: 0
Views: 391
Reputation: 597941
If TIdHTTP
receives a response code that results in an EIdHTTPProtocolException
exception being raised, you can access the page's text from the EIdHTTPProtocolException.ErrorMessage
property.
Upvotes: 4