Hello,
In fact all of mentioned ways are proper, according to your needs. The easiest way is to create a service that will send a REST request to external systems (available OOTB and the fastest way). They can be browsed through the Snippet or ContentLoaderFunction Resource. It allows you to send most basic HTTP requests (GET, POST, PUT, DELETE).
There is also possibility to create a Thingworx Extension and do pretty much anything using Java code (or even Java libraries) to configure and connect. For more information please refer to the Thingworx Extension Guide.
Hope it helps, in case of any additional questions, don't hesitate to ask.
Regards,
J.