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
- 파이썬3
- Angular
- react
- JSON
- React-router
- JPA
- data grid component
- MySQL
- Redux
- CSS
- 파이썬
- data gird component
- data table component
- Java
- python3
- Python
- Spring Boot
- data component
- JavaScript
- 페이스북 로그인
- localStorage
- Router
- data component module
- Spring
- mobx
- angular router
- https://www.tistory.com/auth/logout/
- facebook login
- jQuery
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함