whatwg-fetch
Advanced tools
Comparing version 3.6.1 to 3.6.2
@@ -255,5 +255,3 @@ (function (global, factory) { | ||
var contentType = this.headers.get('content-type'); | ||
if (!contentType) { | ||
if (!this.headers.get('content-type')) { | ||
if (typeof body === 'string') { | ||
@@ -266,6 +264,2 @@ this.headers.set('content-type', 'text/plain;charset=UTF-8'); | ||
} | ||
} else if (contentType.indexOf('json') >= 0 && typeof this._bodyInit !== 'string') { | ||
// Always pass a text representation of a non-stringified JSON body | ||
// to `XMLHttpRequest.send` to retain a compatible behavior with the browser. | ||
this._bodyInit = this._bodyText; | ||
} | ||
@@ -272,0 +266,0 @@ }; |
@@ -249,5 +249,3 @@ var global = | ||
var contentType = this.headers.get('content-type') | ||
if (!contentType) { | ||
if (!this.headers.get('content-type')) { | ||
if (typeof body === 'string') { | ||
@@ -260,6 +258,2 @@ this.headers.set('content-type', 'text/plain;charset=UTF-8') | ||
} | ||
} else if (contentType.indexOf('json') >= 0 && typeof this._bodyInit !== 'string') { | ||
// Always pass a text representation of a non-stringified JSON body | ||
// to `XMLHttpRequest.send` to retain a compatible behavior with the browser. | ||
this._bodyInit = this._bodyText | ||
} | ||
@@ -266,0 +260,0 @@ } |
{ | ||
"name": "whatwg-fetch", | ||
"description": "A window.fetch polyfill.", | ||
"version": "3.6.1", | ||
"version": "3.6.2", | ||
"main": "./dist/fetch.umd.js", | ||
@@ -6,0 +6,0 @@ "module": "./fetch.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54800
1065