mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
Update README.md about validateStatus (#2912)
Rewrote the comment from "Reject only if the status code is greater than or equal to 500" to "Resolve only if the status code is less than 500"
This commit is contained in:
@@ -578,7 +578,7 @@ Using the `validateStatus` config option, you can define HTTP code(s) that shoul
|
||||
```js
|
||||
axios.get('/user/12345', {
|
||||
validateStatus: function (status) {
|
||||
return status < 500; // Reject only if the status code is greater than or equal to 500
|
||||
return status < 500; // Resolve only if the status code is less than 500
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user