Skip to content

Commit

Permalink
Update response interceptor docs (axios#2399)
Browse files Browse the repository at this point in the history
  • Loading branch information
SAGARACH65 authored and genie-youn committed Sep 27, 2019
1 parent f41eadf commit 08719e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -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);
});
Expand Down

0 comments on commit 08719e0

Please sign in to comment.