Accessing Thing's Service as REST API
Hi,
Done basic TW tutorial.
I have written MyThing.myService() that returns JSONObject.
return type=JSON
var ans=op1 * op2;
var Jres = {"answer":ans};
result = Jres;
external clients is only expecting JSON details (highlighted), but the HTTP response contains ThingworxLogo.png and few <TR> <TD> tags as below
how to get rid of these non-JSON data in HTTP response
Regards,
Aniruddha
<HTML><HEAD><TITLE>ThingWorx: Thing com.thingworx.things.ConfiguredThing@4dbad8d7 : Response From Execution Of multiply</TITLE><LINK rel='Stylesheet' href='/Thingworx/css/thingworxapi.css' type='text/css'></LINK><META http-equiv='Content-Type' content='text/html'></META><META http-equiv='cache-control' content='no-cache, no-store'></META><META http-equiv='expires' content='-1'></META><META http-equiv='pragma' content='no-cache, no-store'></META></HEAD><BODY><IMG SRC="/Thingworx/images/ThingworxLogo.png"/><BR/><H1>multiply</H1><TABLE><TR><TH>result</TH></TR><TR><TD>{"answer":182.0}</TD></TR></TABLE></BODY></HTML>



