diff --git a/papaparse.js b/papaparse.js index f00ae56..255d2ea 100644 --- a/papaparse.js +++ b/papaparse.js @@ -581,6 +581,16 @@ } 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) {