Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi,
I am doing a request in Thingworx to a server that denies the request. The server in question is configured to only accept requests from a particular server.
So my question is, is there any way to see in Thingworx the origin of the request made from Thingworx?
Kindly
Oskar Berntorp
Solved! Go to Solution.
Yes, you can create a service with the following content and JSON result
result = Resources["ContentLoaderFunctions"].LoadJSON({url: "https://httpbin.org/ip"});
The server contacted will respond the callers ip. You can check yourself by visiting the url in the browser.
Thingworx can't know about the network infrastructure between itself and the server receiving the request, so no, you can't see this in Thingworx.
It could be visible in the error message or in the error log of the remote server.
Yes, you can create a service with the following content and JSON result
result = Resources["ContentLoaderFunctions"].LoadJSON({url: "https://httpbin.org/ip"});
The server contacted will respond the callers ip. You can check yourself by visiting the url in the browser.
Additional hint: the solution I presented only shows the IP which is used to contact the server (which in this case is in the internet). If your destination server is in your local network the hint will not work.