Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

HTTP request and Http Client #24

Open
reboottime opened this issue Nov 20, 2023 · 1 comment
Open

HTTP request and Http Client #24

reboottime opened this issue Nov 20, 2023 · 1 comment
Labels

Comments

@reboottime
Copy link
Owner

reboottime commented Nov 20, 2023

Common Needs

When building single page applications, the common needs are

  • Configure the request URL for a set of API endpoints
  • Add request header, for example, add JWT Authorization header
  • Config interceptors for common pre-request or response-logging logic, such as refreshing tokens, logging, or centralizing error handling.
@reboottime
Copy link
Owner Author

HttpClient

  • DI: Angular provides built in http request toolset - HttpClient, and we use it generally like how we use other dependency injections.
  • HttpClient supports above common needs by adding HttpInterceptor to HttpClient

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant