2
0
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:
Sagar Acharya
2019-09-13 07:15:36 +05:45
committed by Felipe Martins
parent 6a4a85c57f
commit f5704fce71
+2
View File
@@ -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);
});