summaryrefslogtreecommitdiff
path: root/src/web/app/boot.js
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-12 02:19:19 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-12 02:19:19 +0900
commit7791dd547123b721d918d666504fdf276f0ccfc7 (patch)
tree7a7320891985f323829afcce6fcea31ae712fad0 /src/web/app/boot.js
parent[Server] text/plainの場合もJSONとして解析するように (diff)
downloadmisskey-7791dd547123b721d918d666504fdf276f0ccfc7.tar.gz
misskey-7791dd547123b721d918d666504fdf276f0ccfc7.tar.bz2
misskey-7791dd547123b721d918d666504fdf276f0ccfc7.zip
[Client] Use JSON for API requests
Diffstat (limited to 'src/web/app/boot.js')
-rw-r--r--src/web/app/boot.js7
1 files changed, 3 insertions, 4 deletions
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) {