VAR
HttpWebRequest@1000000001 : DotNet "'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Net.HttpWebRequest" RUNONCLIENT;
HttpWebResponse@1000000004 : DotNet "'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Net.HttpWebResponse" RUNONCLIENT;
HttpStatusCode@1000000005 : DotNet "'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Net.HttpStatusCode" RUNONCLIENT;
Stream@1000000014 : DotNet "'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.IO.Stream" RUNONCLIENT;
TextEncoding@1000000004 : DotNet "'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Text.Encoding" RUNONCLIENT;
ResStreamReader@1000000010 : DotNet "'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.IO.StreamReader" RUNONCLIENT;
ResStream@1000000012 : DotNet "'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.IO.Stream" RUNONCLIENT;
Response@1000000015 : Text;
RequestData@1000000006 : Text;
HttpWebRequest:=HttpWebRequest.HttpWebRequest;
HttpWebRequest:=WebRequest.Create('http://API_URL');
HttpWebRequest.ContentType:='application/xml';
HttpWebRequest.Method:='POST';
Stream:=HttpWebRequest.GetRequestStream();
Stream.Write(TextEncoding.ASCII.GetBytes(RequestData),0,TextEncoding.ASCII.GetBytes(RequestData).Length);
Stream.Close();
HttpWebResponse:=HttpWebResponse.HttpWebResponse;
HttpWebResponse:=HttpWebRequest.GetResponse();
HttpResStatus:=HttpWebResponse.StatusCode();
CLEAR(Response);
IF HttpResStatus=200 THEN BEGIN
ResStream:=HttpWebResponse.GetResponseStream();
ResStreamReader:=ResStreamReader.StreamReader(ResStream,TextEncoding.Unicode);
Response:=ResStreamReader.ReadToEnd();
END ELSE BEGIN
ResStream:=HttpWebResponse.GetResponseStream();
ResStreamReader:=ResStreamReader.StreamReader(ResStream,TextEncoding.Unicode);
Response:=HttpWebResponse.StatusDescription;
END;