Skip to main content

Rxjs

Angular and Rxjs Http Requests: Common scenarios

·938 words·5 mins
Any modern web application needs, sooner or later, to perform some http requests to retrieve data. Below, I’ll describe some common scenarios and how to perform such requests using RxJS. Single request # The most common scenario, no special rxjs handling needed, since Angular provides an Http service that returns an Observable. services.getItems().subscribe(); Is that easy? Yes. In the particular example, I assumed the http service call was inside the service.getItems method, but it could be a fetch or anything else returning an observable.