Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
suhaotian committed Jul 25, 2024
1 parent 15208d8 commit 107838a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,12 @@ http.interceptors.request.use((config) => {
http.interceptors.request.use((config) => {
return config;
});

async function getData() {
const { data } = await http.get('/');
console.log(data);
return data;
}
```

Response interceptors:
Expand All @@ -296,6 +302,12 @@ http.interceptors.response.use(
return Promise.reject(error);
}
);

async function getData() {
const { data } = await http.get('/');
console.log(data);
return data;
}
```

### Cleanup interceptors
Expand Down

0 comments on commit 107838a

Please sign in to comment.