fix(common): don't guess Content-Type for FormData bodies (#18104)

Fixes #18096
This commit is contained in:
Alex Rickabaugh 2017-07-13 12:28:20 -07:00 committed by Igor Minar
parent f0beb4d750
commit 4f1e4ffa4e
1 changed files with 2 additions and 2 deletions

View File

@ -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.