Skip to content

Commit 4c01176

Browse files
authored
fix: Updated request.ts for customized client code generation (#40)
1 parent 0ae1568 commit 4c01176

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/react-app/request.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const axiosInstance = axios.create({
1717
});
1818

1919
// Add a request interceptor
20-
axios.interceptors.request.use(
20+
axiosInstance.interceptors.request.use(
2121
function (config) {
2222
// Do something before request is sent
2323
return config;
@@ -29,7 +29,7 @@ axios.interceptors.request.use(
2929
);
3030

3131
// Add a response interceptor
32-
axios.interceptors.response.use(
32+
axiosInstance.interceptors.response.use(
3333
function (response) {
3434
// Any status code that lie within the range of 2xx cause this function to trigger
3535
// Do something with response data

0 commit comments

Comments
 (0)