cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

getJson returning header in output

Regular Member

getJson returning header in output

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 1

Re: getJson returning header in output

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".