Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
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
GetText is working for me on 9.1, refer below screenshot,
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.
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
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