2
0
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:
hexaez
2020-04-22 21:59:26 +08:00
committed by GitHub
parent 5e0fb5fc99
commit 16b5718954
+1 -1
View File
@@ -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
}
})
```