Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 16, 2023
1 parent c5f9810 commit 0c957b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ await ofetch('/url', { ignoreResponseError: true })

## ✔️ Auto Retry

`ofetch` Automatically retries the request if an error happens and if response status code is included in `retryStatusCodes` list:
`ofetch` Automatically retries the request if an error happens and if response status code is included in `retryStatusCodes` list.

Default is `1` retry, except for `POST`, `PUT`, `PATCH` and `DELETE` methods ofetch does not retry.

**Retry status codes:**

- `408` - Request Timeout
- `409` - Conflict
Expand All @@ -111,8 +114,6 @@ await ofetch('/url', { ignoreResponseError: true })
- `503` - Service Unavailable
- `504` - Gateway Timeout

Default is `1` retry, except for `POST`, `PUT`, `PATCH` and `DELETE` methods ofetch does not retry.

```ts
await ofetch('http://google.com/404', {
retry: 3
Expand Down

0 comments on commit 0c957b2

Please sign in to comment.