From 7791dd547123b721d918d666504fdf276f0ccfc7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 12 Feb 2017 02:19:19 +0900 Subject: [Client] Use JSON for API requests --- src/web/app/boot.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/web/app/boot.js') diff --git a/src/web/app/boot.js b/src/web/app/boot.js index 2eca91ebd4..8c7a2e0fd6 100644 --- a/src/web/app/boot.js +++ b/src/web/app/boot.js @@ -111,10 +111,9 @@ function fetchme(token, cb) { // Fetch user fetch(CONFIG.api.url + "/i", { method: 'POST', - headers: { - 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8' - }, - body: "i=" + token + body: JSON.stringify({ + i: token + }) }).then(res => { // When failed to authenticate user if (res.status !== 200) { -- cgit v1.3.1-freya