simplify handling of FormData
This commit is contained in:
parent
fd2f381cea
commit
fbb324e433
1 changed files with 1 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ module.exports = function($window) {
|
||||||
|
|
||||||
var useBody = typeof args.useBody === "boolean" ? args.useBody : args.method !== "GET" && args.method !== "TRACE"
|
var useBody = typeof args.useBody === "boolean" ? args.useBody : args.method !== "GET" && args.method !== "TRACE"
|
||||||
|
|
||||||
if (typeof args.serialize !== "function") args.serialize = JSON.stringify
|
if (typeof args.serialize !== "function") args.serialize = args.data instanceof FormData ? function(value) {return value} : JSON.stringify
|
||||||
if (typeof args.deserialize !== "function") args.deserialize = deserialize
|
if (typeof args.deserialize !== "function") args.deserialize = deserialize
|
||||||
if (typeof args.extract !== "function") args.extract = extract
|
if (typeof args.extract !== "function") args.extract = extract
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue