Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Call third%2Dparty APIs

Gustavo Denis edited this page Oct 31, 2019 · 1 revision
Main > Using Liquid for building your application > Call third-party APIs

The same truth about calling microservices inside a wider system (same company) is still valid for calling external (micro)services: one should avoid building up cascading failure scenarios.

On the other hand, REST is pervasive on the Internet and back-end to back-end REST calls cannot be avoided.

Take a look at related key concepts of Liquid
REST API as (formal) Object Model
Business Logic Separation

Hence for making it easier to call third-party APIs from a microservice, Liquid provides the ApiWrapper service as bellow.

var location = await new ApiWrapper("ZIPCODE").GetAsync<LocationModel>(zipcode);
See how this is done in Liquid Hotel360 sample application.

Clone this wiki locally