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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

getJson returning header in output

isha
7-Bedrock

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
MarekP.Nowaczyk
14-Alexandrite
(To:isha)

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

Top Tags