How to send REST request from Thingworx to outside server/device?
Thingworx REST API are all about from outside server/device invoke API to Thingworx, but how to send a REST API from Thingworx to external server/device? for example, send request to actuator to control it
You can create a service for a Thing where you can issue an HTTP request using any of the allowed actions (GET, POST, PUT, DELETE) using the available option from the ContentLoaderFunctions library, i.e. PostXML or GetXML, then in the script itself you can specify all the parameters of the REST call such as the URL yo connect to, the headers, content, username and password, whether to use a proxy or not. Basically all the same inputs you'd need to provide to a browser or desktop based REST client. Also the output of the particular service will have to be XML or HTML and either assign it to a property for later inspection and validation of the outcome or you can do all the validation in the same service and return whatever result you need.
The basic idea being that the ContentLoaderFunctions library has all the functions which should allow you build, request and process a REST call to a remote web service.