diff --git a/src/js/api.js b/src/js/api.js index bbdb1a4..8edef4c 100644 --- a/src/js/api.js +++ b/src/js/api.js @@ -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 }); }); } -}; \ No newline at end of file +};