Alternative to APIs
An alternative to using APIs.
We'll cover the following
Of course, you could avoid an API altogether if you feel too restricted by the data that’s provided by the public APIs.
Mocking an API using observables
To do this, we can provide the data we’d like directly within any services we create.
Assuming we’d like them to return observables to mimic asynchronous HTTP requests to an API, we’ll follow these steps:
- Start with the following imports.
Get hands-on with 1400+ tech skills courses.