TScHttpWebRequest StatusCode How to display Status Value and Description
Posted: Mon 29 Jul 2019 15:27
Hi I am using TScHttpWebRequest and TScHttpWebResponse to get info, It works, but when fails I would like to show the error in a correct way to the user. How can I handle the StatusCode error?
Request: TScHttpWebRequest;
Response: TScHttpWebResponse;
try
Response := Request.GetResponse;
Output := Response.ReadAsString;
except
on E:Exception do
begin
// Here I would like to get the StatusDescription or the StatusValue
end;
end;
Request: TScHttpWebRequest;
Response: TScHttpWebResponse;
try
Response := Request.GetResponse;
Output := Response.ReadAsString;
except
on E:Exception do
begin
// Here I would like to get the StatusDescription or the StatusValue
end;
end;