Initial Commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# Axios v1 인터셉터 참조
|
||||
|
||||
출처: https://axios-http.com/docs/interceptors
|
||||
확인일: 2026-09-11
|
||||
|
||||
## 응답 인터셉터
|
||||
|
||||
2xx 밖 응답은 response interceptor의 reject handler로 들어옴. 오류를 처리하지 않을 때는 reject/throw로 다음 호출자에게 전달해야 함.
|
||||
|
||||
```ts
|
||||
instance.interceptors.response.use(
|
||||
(response) => response,
|
||||
(error) => Promise.reject(error)
|
||||
)
|
||||
```
|
||||
|
||||
여러 response interceptor는 등록 순서(FIFO)로 실행됨.
|
||||
Reference in New Issue
Block a user