Schttpwebrequest response

Schttpwebrequest response

In order to get data returned by the server, you need to handle HttpException. To do this, please try doing the following:
  try
    Response := ScHttpWebRequest1.GetResponse; 
  except
    on E:HttpException do
      showmessage(E.ServerMessage);
  end;
In this case, E.ServerMessage will contain all data returned by the server. 

    • Related Articles

    • TScHttpWebResponse (accented characters)

      Method ScHttpWebRequest1.GetResponse.ReadAsString expects response to have a UTF-8 encoding, and decodes them as UTF-8.  You may get response content "as-is" by using -ScHttpWebRequest1.GetResponse.ReadAsBytes ...