diff --git a/examples/react-app/request.ts b/examples/react-app/request.ts index a1378a3..31c95be 100644 --- a/examples/react-app/request.ts +++ b/examples/react-app/request.ts @@ -17,7 +17,7 @@ const axiosInstance = axios.create({ }); // Add a request interceptor -axios.interceptors.request.use( +axiosInstance.interceptors.request.use( function (config) { // Do something before request is sent return config; @@ -29,7 +29,7 @@ axios.interceptors.request.use( ); // Add a response interceptor -axios.interceptors.response.use( +axiosInstance.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