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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access