Skip to main content
Jun 2, 2022 1:02 PM UTC
Solved

PostJSON response object missing properties

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
abjainAnswer
Jun 6, 2022 9:09 AM UTC

2 replies

abjainAnswer
Jun 6, 2022 9:09 AM UTC
STullbergAuthor
Jun 7, 2022 6:41 AM UTC

Perfect, thank you for the information!

 

Best regards / Simon