Browse Source

Add support for download xhr headers (#375)

pull/377/merge
Jim Wright 8 years ago committed by Sergi Almacellas Abellana
parent
commit
8383fb4290
  1. 10
      papaparse.js

10
papaparse.js

@ -581,6 +581,16 @@
} }
xhr.open('GET', this._input, !IS_WORKER); xhr.open('GET', this._input, !IS_WORKER);
// Headers can only be set when once the request state is OPENED
if (this._config.downloadRequestHeaders)
{
var headers = this._config.downloadRequestHeaders;
for (var headerName in headers)
{
xhr.setRequestHeader(headerName, headers[headerName]);
}
}
if (this._config.chunkSize) if (this._config.chunkSize)
{ {

Loading…
Cancel
Save