Ajax: Support binary data (including FormData)

Two changes have been applied:
* prefilters are now applied before data is converted to a string;
  this allows prefilters to disable such a conversion
* a prefilter for binary data is added; it disables data conversion
  for non-string non-plain-object `data`; for `FormData` bodies, it
  removes manually-set `Content-Type` header - this is required
  as browsers need to append their own boundary to the header

Ref gh-4150
Closes gh-5197
This commit is contained in:
Michał Gołębiowski-Owczarek
2023-02-01 13:48:35 +01:00
committed by GitHub
parent 0b9c5037f7
commit a7ed9a7b63
8 changed files with 109 additions and 5 deletions

View File

@@ -55,6 +55,7 @@
"karma-qunit": "4.1.2",
"karma-webkit-launcher": "2.1.0",
"load-grunt-tasks": "5.1.0",
"multiparty": "4.2.3",
"native-promise-only": "0.8.1",
"playwright-webkit": "1.29.2",
"promises-aplus-tests": "2.1.2",