mirror of
https://github.com/DIYgod/DPlayer
synced 2024-11-22 18:56:54 +00:00
Merge pull request #204 from a-wing/patch-1
Fix POST Content-type: application/json
This commit is contained in:
commit
ee618f7d20
@ -24,6 +24,7 @@ const SendXMLHttpRequest = (url, data, success, error, fail) => {
|
||||
};
|
||||
|
||||
xhr.open(data !== null ? 'POST' : 'GET', url, true);
|
||||
xhr.setRequestHeader("Content-type", "application/json; charset=UTF-8");
|
||||
xhr.send(data !== null ? JSON.stringify(data) : null);
|
||||
};
|
||||
|
||||
@ -50,4 +51,4 @@ export default {
|
||||
callback({ status: xhr.status, response: null });
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user