Help on TWebHttpRequest

Hi,
i need some example on manage errors on TwebHttRequest.
I need to known status and error codes (200=ok, error 400, etc...);
How I can obtain this status infos, or there are examples on manage http status?
Thanks in advance.

Did you try something like:

procedure TForm1.WebHttpRequest1RequestResponse(Sender: TObject;
  ARequest: TJSXMLHttpRequestRecord; AResponse: string);
begin
  if (ARequest.req.Status = '404') then
     ...
  if (ARequest.req.Status = '200') then
     ...
end;

Hi Bruno, ok.
Please be careful that Status is not a String, but an integer. There is a bug.
Thanks

Sorry, indeed, I overlooked this.

Hi Bruno,
also Code Completation tell string... but at compile time is required an Integer. So need to be correct.
Good Job

We can confirm the code completion will be corrected in v1.5