Skip to content

Commit

Permalink
fix: Updated request.ts for customized client code generation (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
7nohe authored Mar 23, 2024
1 parent 0ae1568 commit 4c01176
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/react-app/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 4c01176

Please sign in to comment.