
Set up a practical Angular development environment with Visual Studio Code or any editor, Chrome or other browsers, and a terminal for Angular CLI commands.
Explore how Angular client communicates with backend services over http, sending requests (get, post, put, patch, delete) and receiving responses to perform create, read, update, and delete operations.
Import the http client from the same module and inject it into the class via a private constructor parameter, then access it with this to build back end requests.
Understand how observables emit data via subscribers and subscriptions without blocking, using next, error, and complete callbacks. Subscribe to trigger execution and handle the ECB response, including error handling.
Learn to inject a user service, call get users, and subscribe to observables in ngOnInit to retrieve and log user data from an API.
Set up an environment variable to manage the api base url for development and production, and inject it into the service for consistent, configurable http requests.
Explore how to use Angular HTTP patch to update only the changed fields by resource id, leaving other data intact, unlike put which requires the full payload.
Learn to use patch requests for partial updates in angular http communication, sending only the properties to change (name, email, username) via the user id.
Implement a delete request for a user by ID, handle void responses, log results, and verify a 200 OK with an empty body.
Learn how http headers let the client and server exchange information during requests and responses in Angular, including content-type, authorization, and the HttpHeaders class for setting, appending, and deleting headers.
Learn how to use the map operator in Angular HTTP to transform API data on the client, such as uppercasing user names before presenting them in the user interface.
Use the map operator to transform incoming data by adding derived attributes like is admin and user id, and reshape objects to include only email, id, and website.
Set a default user image using robo hash, add an optional image attribute, and lowercase the user name to fetch and display a random robot image in the UI.
Explore the retry operator in Angular HTTP communication, retrying up to three times before failing, and learn how observables, pipe, and share replay caching help avoid backend flooding.
HTTP is the primary protocol for browser and server communication. The Angular HTTP library simplifies application programming with the XHR and JSONP APIs. Almost all Angular applications need to make HTTP requests to a back-end web API to retrieve, save, update, and delete data. This course teaches basic, as well as advanced features of Angular HTTP.
This course also covers an introduction to the new HTTP client module, example of an HTTP GET, improved Type Safety, HTTP Request Parameters (Immutability-based API), HTTP Headers (Immutability-based API), HTTP PUT, PATCH, POST, DELETE, some REST Guidelines (specific to RESTful JSON) for using the multiple HTTP methods, and much more. It also goes over the major features of the HTTP client service provided by angular such as the ability to request typed response objects, streamlined error handling, request and response interception.
In addition, it teaches how to use RxJS, and the RxJS operators that are most common when working with the Angular HTTP client. A significant part of this course is dedicated to teaching how to work with another new use case that is supported by the HTTP client; Progress HTTP Events.
The new Angular HTTP Client is a great evolution when compared to the previous HTTP client in the front-end world of wed development. It's more user-friendly and helps to improve the type safety of our code.