fix(common): don't guess Content-Type for FormData bodies (#18104)
Fixes #18096
This commit is contained in:
parent
f0beb4d750
commit
4f1e4ffa4e
|
@ -266,9 +266,9 @@ export class HttpRequest<T> {
|
|||
if (this.body === null) {
|
||||
return null;
|
||||
}
|
||||
// FormData instances are URL encoded on the wire.
|
||||
// FormData bodies rely on the browser's content type assignment.
|
||||
if (isFormData(this.body)) {
|
||||
return 'multipart/form-data';
|
||||
return null;
|
||||
}
|
||||
// Blobs usually have their own content type. If it doesn't, then
|
||||
// no type can be inferred.
|
||||
|
|
Loading…
Reference in New Issue