@derekpitt/fw
Advanced tools
Comparing version 0.3.5 to 0.3.6
@@ -105,3 +105,7 @@ "use strict"; | ||
p.open(method, url + _this.buildParamString(params), true); | ||
p.setRequestHeader("Content-Type", "application/json"); | ||
// if content is FormData, do nothing, just let the browser do it's thing | ||
// otherwise, set this thing to json | ||
if (!(content instanceof FormData)) { | ||
p.setRequestHeader("Content-Type", "application/json"); | ||
} | ||
p.setRequestHeader("Accept", "application/json, text/javascript, */*; q=0.01"); | ||
@@ -147,3 +151,7 @@ if (_this.middleware.length > 0) { | ||
}); | ||
p.send(content ? JSON.stringify(content) : undefined); | ||
if (content) { | ||
p.send(content instanceof FormData ? content : JSON.stringify(content)); | ||
} else { | ||
p.send(); | ||
} | ||
}); | ||
@@ -150,0 +158,0 @@ } |
{ | ||
"name": "@derekpitt/fw", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"description": "a class based api for vue2. includes routing and simple DI.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.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
78570
1883