|
|
@ -642,7 +642,7 @@ License: MIT |
|
|
|
xhr.onerror = bindFunction(this._chunkError, this); |
|
|
|
xhr.onerror = bindFunction(this._chunkError, this); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
xhr.open('GET', this._input, !IS_WORKER); |
|
|
|
xhr.open(this._config.downloadRequestBody ? 'POST' : 'GET', this._input, !IS_WORKER); |
|
|
|
// Headers can only be set when once the request state is OPENED
|
|
|
|
// Headers can only be set when once the request state is OPENED
|
|
|
|
if (this._config.downloadRequestHeaders) |
|
|
|
if (this._config.downloadRequestHeaders) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -661,7 +661,7 @@ License: MIT |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
xhr.send(); |
|
|
|
xhr.send(this._config.downloadRequestBody); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (err) { |
|
|
|
catch (err) { |
|
|
|
this._chunkError(err.message); |
|
|
|
this._chunkError(err.message); |
|
|
|