Angular HTTP 인터셉터
Angular 4.3부터 추가된 HttpClientModule에는 http 요청에 인터셉터를 적용할 수 있다. 인터셉터를 간단히 설명하면 api나 특정 data를 요청 할 때 그 요청을 가로채는 역할을 한다. 인터셉터를 사용하기 위해서는 HttpInterceptor를 구현해야 한다. interface HttpInterceptor { // intercept의 첫번째 인자는 처리할 요청을 받고, 두번째는 다음 인터셉터를 가리키는 HTTP 핸들러다. intercept(req: HttpRequest, next: HttpHandler): Observable } ex) 서버에서 보내준 헤더 받기 export class HeaderInterceptor implements HttpInterceptor { interce..
FrontEnd/Angular
2018. 8. 22. 10:11
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- data component module
- Spring Boot
- Python
- python3
- 페이스북 로그인
- Spring
- mobx
- jQuery
- https://www.tistory.com/auth/logout/
- data table component
- CSS
- Angular
- React-router
- data component
- 파이썬
- angular router
- 파이썬3
- data grid component
- facebook login
- JPA
- localStorage
- JSON
- Redux
- data gird component
- JavaScript
- react
- Java
- Router
- MySQL
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함