diff --git a/src/fetch_request.js b/src/fetch_request.js index 08a0d80..1d1713a 100644 --- a/src/fetch_request.js +++ b/src/fetch_request.js @@ -44,7 +44,7 @@ export class FetchRequest { body: this.formattedBody, signal: this.signal, credentials: 'same-origin', - redirect: 'follow' + redirect: this.redirect } } @@ -101,6 +101,10 @@ export class FetchRequest { return this.options.signal } + get redirect () { + return this.options.redirect || 'follow' + } + get additionalHeaders () { return this.options.headers || {} }