Skip to main content
10-Marble
June 2, 2022
Solved

PostJSON response object missing properties

  • June 2, 2022
  • 1 reply
  • 1268 views

Hello, 

 

Im trying to get the response body from a Resources["ContentLoaderFunctions"].PostJSON(params) call. When I try the POST call from Postman I get the following as a response in a response Headers and Body: 

HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1
Content-Length: 15
Server: Jetty(7.x.y-SNAPSHOT)
RC: 1 Success

When I try the same call from Thingworx PostJSON I only get the headers JSON object of the request as the response object looking like this (xxxx = the auth code): 
 
{"headers":{"Authorization":"xxxx"}}

Anyone now why? And more specifically how I get the RC: 1 Success value from the response body?

Using ThingWorx 9.1.8-b845
Best answer by abjain

@STullberg : I think this has been fixed in thingworx 9.2.

https://www.ptc.com/en/support/article/CS365623

https://www.ptc.com/en/support/article/CS228550

 

1 reply

abjain15-MoonstoneAnswer
15-Moonstone
June 6, 2022
STullberg10-MarbleAuthor
10-Marble
June 7, 2022

Perfect, thank you for the information!

 

Best regards / Simon