At the core of the HTTPClient
module is the HttpClient
. It performs HTTP requests using XMLHttpRequest
as the default backend (JSONP is also available, as we will see later in this chapter). It supports requests such as GET
, POST
, PUT
, and DELETE
. In this chapter, we will use the HttpClient
to make all of these types of requests. As we will see, the HttpClient
makes it easy to make these calls with a minimal amount of setup and complexity. None of this terminology will come as a surprise to anyone who has previously worked with Angular or built JavaScript applications that communicate with a backend data store.
However, there is a substantial change in the way Angular handles HTTP requests. Calling a request now returns an Observable of HTTP responses. It does so by using the RxJS library, which is a well-known open source implementation of the asynchronous Observable pattern.
Note
You can find the RxJS project on GitHub at https://github.com/Reactive-Extensions...