🕵️♂️ How to use Angular interceptor to control requests and incoming responses?
When the client application handles the HTTP requests and responses, there is the possibility to customize them by :
1- adding headers to all requests (for example, authorization token, content type)
2- by logging (if we want to log the entire request/ response )
The power of interceptors centralizes all the logic that we want to implement in one service or class to manipulate multiple requests and responses and avoid working on each request individually.
Standardization has allowed us to achieve interoperability. Different organizations and vendors can develop hardware and software to be connected to the Internet. Unless they agree on a protocol, their hardware and software would not be able to talk to each other. Standardization is all interested stakeholders sitting together, debating, and agreeing on a protocol or design.
Also, it’s important to know what’s out there, who designed what, and why.
Also, you’d know where to submit your ideas in case you come up with a better design for any of the protocols we’re going to study.
The birth of the Internet can be traced back to the middle of the last century.
In 1957, the Soviet Union successfully launched Sputnik I. In response, the U.S. government created ARPA (Advanced Research Projects Agency), which was responsible for developing emerging technologies which is part of the United States Department of Defense because both nations were in the midst of a cold war.