When using TIdHttp like this:
Memo1.Text := IdHTTP1.post(url,data);
I can get response content to memo1 if it doesn't give http error. But when it gives http bad request, Indy doesn't give me content. I'm also using try..except but it only prevent error box and still doesn't give me content.
How can I get content even it returns http error?
When an HTTP error occurs,
TIdHTTP
raises anEIdHTTPProtocolException
exception. That exception contains the HTTP status code in itsErrorCode
property, the HTTP status text in itsMessage
property, and the response data in itsErrorMessage
property.