Making Ajax Calls With an Observable
Explore how to create Ajax calls using Observables in RxJS. Understand how to wrap XMLHttpRequest, handle success and error cases, and trigger requests by subscribing to Observables for effective reactive programming.
We'll cover the following...
We'll cover the following...
We haven’t done anything useful with Observables yet. How about we create an Observable that retrieves remote content? To do this, we’ll wrap the XMLHttpRequest object using Rx.Observable.create:
In the preceding code, the get function uses the ...