How to check the value of "newOk":(true/false), which comes in the response body from the post request?
httpAddr = 'https://<link>'
client = WebClient()
client.Headers.Add("Content-Type","application/json")
client.Headers.Add("Authorization","Basic <code>")
client.Encoding = System.Text.Encoding.UTF8;
webRequest = WebRequest.Create(httpAddr);
reply = client.UploadString(httpAddr, body.ToString())
To read the body of a response, you can use the method
GetWebResponse(Read: https://learn.microsoft.com/en-us/dotnet/api/system.net.webclient.getwebresponse?view=net-6.0) on yourWebClientobject instance.Then, in the
WebReponseclass you can use the methodGetResponseStreamto read the body of the response of that request.Depending on how the body response is formatted (html, json, xml), you'll need to parse it with the appropriate .net class.