08-16-2022, 01:23 AM
Dear All; when TIdHTTP::Get method throws out an EIdHTTPProtocolException, where do I find details of the error?
For instance:
Thanks in advance. Boba.
For instance:
Code:
TIdHTTP *IdHTTP;
AnsiString strURL="https://....";
//...
try{
TMemoryStream *m = new TMemoryStream;
IdHTTP->Get(strURL,m);
m->SaveToFile("tst.txt");
delete m;
}catch(EIdHTTPProtocolException &e){
ShowMessage(e.Message);//shows "HTTP/1.1 400 Bad Request"
}