Skip to main content
13-Aquamarine
February 23, 2020
Solved

How to get response Status of Content Loader functions

  • February 23, 2020
  • 2 replies
  • 1509 views

Hi,

 

Is there a way to print response status code of Content loader functions such as GetCookies, GetJSON, PostJSON, LoadJSON....etc

 

Please provide some idea to solve above problem?

 

Thingworx Version: 8.2.5

 

Thanks,

Nagaraj

Best answer by Constantine

Hello Nagaraj,

 

You can get it by wrapping your call in try/catch. As far as I remember, any response except for 2xx should throw an exception, which you can parse in the catch block.

 

/ Constantine

2 replies

18-Opal
February 24, 2020

Hello Nagaraj,

 

You can get it by wrapping your call in try/catch. As far as I remember, any response except for 2xx should throw an exception, which you can parse in the catch block.

 

/ Constantine

Community Manager
March 5, 2020

HI @NERaj.

 

If you feel the response from Constantine answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon