2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-05 16:42:32 +03:00

Allow custom HTTP status code error ranges (#308)

Adding support for custom HTTP status code error ranges
This commit is contained in:
Nick Uraltsev
2016-04-26 13:18:58 -07:00
committed by Matt Zabriskie
parent 093593cbca
commit fa9444e0ba
7 changed files with 169 additions and 17 deletions
+5 -1
View File
@@ -58,5 +58,9 @@ module.exports = {
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1
maxContentLength: -1,
validateStatus: function validateStatus(status) {
return status >= 200 && status < 300;
}
};