@nanoservice-ts/api-call
node. The workflow retrieves a list of countries and their capitals from a public API and returns the data as a JSON response.
workflows/json/countries.json
:
/
)@nanoservice-ts/api-call
node to make a GET request to the countries APItrigger
section:
@nanoservice-ts/api-call
node, which is a built-in node that handles HTTP requests to external APIs. This node is configured with inputs specifying the URL, method, headers, and expected response type:
@nanoservice-ts/api-call
node is implemented as follows:
runApiCall
utility functionurl
in the node inputs to fetch data from a different API:
@nanoservice-ts/api-call
node, you can easily integrate external APIs into your applications without writing complex HTTP client code.
This pattern can be extended to create more sophisticated workflows that combine data from multiple sources, transform data, and implement business logic.