HTTp to REST without response

Hi everyone,

I'm sending a file to a Rest WebService, in this way:

 HttpWebRequest := HttpWebRequest.Create('');
 HttpWebRequest.Method := 'POST';
 postString := STRSUBSTNO('json=%1',pJson);
 StreamWriter := StreamWriter.StreamWriter(HttpWebRequest.GetRequestStream);

But I'mn getting an error in the WebResposne, becasue the server is not responding anything. How can i "run" the request without expecting any response?

Thank you very much

Parents Reply
  • Yes, I'm sure because I can see the log of the webService, and I see that there is processing the jSon I'm sending.

    I did not want to insert my 5 cents, but could you answer for yourself - if you see Log for webService WHY you can't receive any Reason Code xxx (e.g. 401 or ..) answer? If you prepare the right request, sent it and Service received it you should receive the answer.

    P.S. TO be honest, I don't understand why did you use the StreamWriter for HttpWebRequest..I plan to be at home on weekend and if you have not to find the answer, I will send my version (I did request|responce handling for NAV 2016)