Hi,
I’am trying to add an exernal REST service for testing purpose.
So first question : Is it possible to do that (calling an external rest service through this “external service” functionality instead of a direct call ?).
If yes, I’d like to add openweathermap.org free weather API.
So I created a new stack, create the external service pointing to openweathermap.org (“hostname” mode)
Then I deployed a dummy service (in nodeJS) linked to openweathermap (with openweathermap alias).
So in my node code I try to call this external service like this :
var options = {
method: 'GET',
uri: 'http://openweathermap/data/2.5/weather?q=London&APPID={APIKEY}',
headers: {
"Content-type":"application/json"
},
json: true
};
...
but I have the following error :
{
name: "RequestError",
message: "Error: getaddrinfo EIO",
cause: {
code: "EIO",
errno: "EIO",
syscall: "getaddrinfo"
},
}
I though I could use http://[alias_name_of_external_service]/xxx to call my external service from another container in stack.
Did I missed something?
Thank you for your help.