parent
0306401a76
commit
0ce3aa066a
3 changed files with 72 additions and 14 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue