Consume Rest

Hello all,

I want to connect with the localhost from outsystem.How can I do that?

Rank: #258

I'm guessing the question is more about how to connect to your local machine from the OutSystems server (either on-premise or in the cloud). 

For creating the rest service integration, you could generate a swagger file of the service and use that to generate the integration. The problem is with actually using the service. If you tell the server to go to localhost, it's going to try and find your service on the server itself. You'll need to use a url either with your computer name, or ip-adres instead of the localhost for that to work. And off course, a fysical connection between the OutSystems server and your machine.

Rank: #2

Hi Kaushal,

OutSystems REST services are always called from the server the app connects to, even for mobile. This means that "localhost" is always the server. If you have a REST service running elsewhere, regardless of whether that's on your development PC or another server, that REST service must be reachable from the internet, as the server needs to connect to it. How you make that happen is up to you, and is not a topic that's related to the OutSystems Platform.