|
@@ -28,19 +28,8 @@ export default function(ori) {
|
|
|
xhttp = new window.ActiveXObject("Microsoft.XMLHTTP");
|
|
|
xhttp.open(method, url, true);
|
|
|
if (method === "POST") {
|
|
|
- if (typeof ori.data.append === "function") {
|
|
|
- xhttp.setRequestHeader(
|
|
|
- "Content-Type",
|
|
|
- "multipart/form-data"
|
|
|
- );
|
|
|
- xhttp.send(ori.data);
|
|
|
- } else {
|
|
|
- xhttp.setRequestHeader(
|
|
|
- "Content-Type",
|
|
|
- "application/json;charset=UTF-8"
|
|
|
- );
|
|
|
- xhttp.send(JSON.stringify(ori.data));
|
|
|
- }
|
|
|
+ xhttp.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
|
|
|
+ xhttp.send(JSON.stringify(ori.data));
|
|
|
} else {
|
|
|
xhttp.send();
|
|
|
}
|