Error executing GetJSON in service - Invalid Content Type: text/html
Hello guys,
I have a service in ThingWorx 9 where I am trying to use the GetJSON from ContentLoaderFunctions to get the data for a ThingWorx project but I get the following error: " Message :: Invalid Content Type: text/html". I checked the logs and there are no other errors.
I tried to do this request from Postman and it works fine. Also tried a PostJSON and it works fine, so the appKey it's ok. I also tested the javascript from below with ThingWorx 8.5 and it works without any issues...but for ThongWorx 9 it simply does not work.
You can find below the javascript code from my service:
var params = {
headers: {
"appKey": "6b2c8c8b-423e-5a56-c321-5e378ff55662",
"Content-type": "application/json"
} /* JSON */,
url: "http://localhost/Thingworx/Projects/daniel_test_99" /* STRING */
};
var result = Resources["ContentLoaderFunctions"].GetJSON(params);
If it's important "daniel_test_99" it's a local Project with no dependencies.
ThingWorx version: 9.0
Do you have any idea why it's not working?
Thanks!

