mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
Update response interceptor docs (#2399)
This commit is contained in:
committed by
Felipe Martins
parent
6a4a85c57f
commit
f5704fce71
@@ -492,9 +492,11 @@ axios.interceptors.request.use(function (config) {
|
||||
|
||||
// Add a response interceptor
|
||||
axios.interceptors.response.use(function (response) {
|
||||
// Any status code that lie within the range of 2xx cause this function to trigger
|
||||
// Do something with response data
|
||||
return response;
|
||||
}, function (error) {
|
||||
// Any status codes that falls outside the range of 2xx cause this function to trigger
|
||||
// Do something with response error
|
||||
return Promise.reject(error);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user