diff --git a/src/web/app/boot.js b/src/web/app/boot.js
index 2eca91ebd4c81bfc3cfa0567084c9000b72a3785..8c7a2e0fd6a349ea4f631ea5b289f62c4d5e935c 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) {
diff --git a/src/web/app/common/scripts/api.ls b/src/web/app/common/scripts/api.ls
index c96e51b1a8472aaa4891dba746e32f3d16ab147f..47182b6a5aeabcbe52c3aeecec75b173bc7c43db 100644
--- a/src/web/app/common/scripts/api.ls
+++ b/src/web/app/common/scripts/api.ls
@@ -8,7 +8,7 @@ net = riot.observable!
 riot.mixin \net do
 	net: net
 
-module.exports = (i, endpoint, data) ->
+module.exports = (i, endpoint, data = {}) ->
 	if ++pending == 1
 		spinner := document.create-element \div
 			..set-attribute \id \wait
@@ -16,21 +16,12 @@ module.exports = (i, endpoint, data) ->
 	
 	if i? and typeof i == \object then i = i.token
 
-	body = []
-
 	# append user token when signed in
-	if i? then body.push "i=#i"
-
-	for k, v of data
-		if v != undefined
-			v = encodeURIComponent v
-			body.push "#k=#v"
+	if i? then data.i = i
 
 	opts =
 		method: \POST
-		headers:
-			'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
-		body: body.join \&
+		body: JSON.stringify data
 
 	if endpoint == \signin
 		opts.credentials = \include