Skip to main content
1-Visitor
April 15, 2019
Question

getJson returning header in output

  • April 15, 2019
  • 1 reply
  • 1028 views

I am making a get call using thingworx GETJson service. The service is returning headers in between json.

"Name":"CR 03"}],"headers":"","000001":. As headers is not any field in json format it is displaying in output. While hitting the same URL in google chrome it is showing the exact Json format without header field. Please suggest.

 

1 reply

15-Moonstone
April 16, 2019

Check what is the value of "Content-Type" of the response headers in both browser and from GetJSON.

If the browser response Content-Type is anything else than "application/json" like "text/plain" try setting same type in the headers on GetJSON or use GetText instead that uses Content-Type of "text/plain".