Browse Source

Added feature to support POST method when download is true

Added new config property named downloadRequestBody
pull/772/head
danzelt 5 years ago
parent
commit
7bde808305
  1. 4
      papaparse.js

4
papaparse.js

@ -642,7 +642,7 @@ License: MIT @@ -642,7 +642,7 @@ License: MIT
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
if (this._config.downloadRequestHeaders)
{
@ -661,7 +661,7 @@ License: MIT @@ -661,7 +661,7 @@ License: MIT
}
try {
xhr.send();
xhr.send(this._config.downloadRequestBody);
}
catch (err) {
this._chunkError(err.message);

Loading…
Cancel
Save