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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

ContentLoaderFunctions GetText is not working in Thingworx 9.1

vi1
16-Pearl
16-Pearl

ContentLoaderFunctions GetText is not working in Thingworx 9.1

Hello.

 

I am using Thingworx 9.1 version with Postgre SQL. 

GetText function is not working. Got error as "Invalid Content Type: application/json". The same code it was worked with Thingworx 8.5.1 version.

 

var propertiesAttr = Resources["ContentLoaderFunctions"].GetText(params);

 

Could you please suggest?

 

Thank you in Advance.

 

Regards,

Latha

5 REPLIES 5

@vi1 

 

GetText is working for me on 9.1, refer below screenshot, 

SachinSharma_2-1616062172579.png

 

 

Would you be able to the code you are using?

 

Regards,

Sachin

 

Hello,

Thank you for response.

Here I am using url path is outside of thingworx server. When I give the url path is inside thingworx, its working correctly and also if I use GetJSON with outside server url path, working correctly. Observation with GetText service with outside server url path. Refer the below snippet which I am using for GetText.

vi1_0-1616065264226.png

 

 

@vi1 

 

Are you not getting any output or are you getting an error? If it's the latter, please share the error message.

 

Regards,

Sachin

Hi, 

 

I am not getting output if use GetText and getting the below error in Thingworx Logs.

 

   "Invalid Content Type: application/json"

 

Regards,

Latha

@vi1 

 

Updated this post with correct info.

I am able to replicate the behavior on Thingworx 9.1. 

I found this article where it says that starting from Thingworx 9.0, response Content-Type should contain "text" for GetText(). R&D has confirmed that this is a bug and they will be fixing it in later releases. So, please update the response content-type to text and validate the behavior.

 

Regards,

Sachin 

Announcements


Top Tags