Question
· Jul 19, 2022

Empty HTTP response

Hi Guys,

We use the below code to send JSON file to one of our clients and was working fine but I think lately they did a windows update and now whenever we send file we aren't getting any HTTP responses, success or Error, just empty response ()

the think is that it works fine and we get 200 response if we send the JSON file using our client's portal called swagger which is a website where you can assign the token and url (Swagger UI (vibra-api-prod.azurewebsites.net))

nothing has change from our end so why we aren't getting any HTTP response as all (see below)?

Token=GetToken()
FilePath="D:\CollectionGood_10733899.json"
Set File = ##class(%File).%New(FilePath)
Do File.Open("R")
Set Httprequest=##class(%Net.HttpRequest).%New()
Set Httprequest.SSLConfiguration="RTLS"
Set Httprequest.Server="url"
Set Httprequest.Timeout=30
Set Httprequest.Https=1
set Httprequest.ContentType="application/json"
Do Httprequest.SetHeader("Accept","*/*")
Do Httprequest.SetHeader("Authorization","Bearer "_Token)
 do Httprequest.EntityBody.CopyFrom(File)
  Set tSc=Httprequest.Post("/api/sensors/vibration")
Set StateCode=Httprequest.HttpResponse.StatusCode
Set status=Httprequest.HttpResponse.StatusLine
Set Resp=Httprequest.HttpResponse.Data.Read()
  "Sent file for Job : "_JobId_" Status Code : "_StateCode_"|"_status_"|"_ Resp

 

 

Thanks

Product version: Caché 2014.1
Discussion (6)1
Log in or sign up to continue