Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello,
I created a thing with services that able to return a INFOTABLE.
I did tried to create another services that used .ToJSON() and return result in JSON base type.
Both way i couldn't get the result in JSON format when i use postman GET method.
REST return Unexpected 'I' and i don't know what is this mean.
Can somebody tell me how to make it?
Thanks in advanced!
Solved! Go to Solution.
Calling services via REST API are POSTs not GETs. You need to change the type to POST and provide a content-type (likely just application/json). Hope this helps!
Hi Ang CC, Try running the service directly from the composer and check result. Also, make sure to set datashape of the infotable in the script itself.
Check Application logs/Script logs for any error(s).
I hope it helps.
Thanks,
Ankit Gupta
Calling services via REST API are POSTs not GETs. You need to change the type to POST and provide a content-type (likely just application/json). Hope this helps!
Thanks Tori Tielebein, POST is the correct way with the header content-type.