* Fix #2419

* Update the changelog
This commit is contained in:
Isiah Meadows 2019-05-31 10:37:06 -04:00 committed by GitHub
parent 0306401a76
commit 0ce3aa066a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 72 additions and 14 deletions

View file

@ -71,7 +71,7 @@ module.exports = function($window, Promise) {
xhr.open(method, url, args.async !== false, typeof args.user === "string" ? args.user : undefined, typeof args.password === "string" ? args.password : undefined)
if (assumeJSON && !hasHeader(args, /^content-type$/i)) {
if (assumeJSON && body != null && !hasHeader(args, /^content-type$/i)) {
xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8")
}
if (typeof args.deserialize !== "function" && !hasHeader(args, /^accept$/i)) {