We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 84b2aaa + fe06543 commit 0394c5dCopy full SHA for 0394c5d
src/response.js
@@ -76,13 +76,13 @@ export default class Response {
76
});
77
}
78
79
- static redirect(url, status) {
+ static redirect(url, status = 302) {
80
//1. Let parsedURL be the result of parsing url with current settings object’s API base URL.
81
//2. If parsedURL is failure, then throw a TypeError.
82
const parsedURL = parse_url(url);
83
84
//3. If status is not a redirect status, then throw a RangeError.
85
- let intStatus = parseInt(status, 10);å
+ let intStatus = parseInt(status, 10);
86
if(intStatus < 300 || intStatus > 399) {
87
throw new RangeError('Not a redirect status');
88
0 commit comments