2. Using APIs

The two types of API call processing are synchronous and asynchronous. With the synchronous calls, clients make an API request and then wait for the response. Once the request has been completed, the API sends back the HTTP response. The response will indicate whether the execution was successful with HTTP status codes and include any data that needs to be returned. If the request takes a long time to complete (or the API fails to send a response at all for any reason), the requesting app may time out or even hang forever.

An alternative is to use the asynchronous approach. In this case, the API responds right away, notifying the client that it has received the request for processing. No data or success status is included because ...

Get Cisco DEVCOR 350-901 Study Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.