From 2aa73f581fd0dd504be1cc9402a3b34499b6abc4 Mon Sep 17 00:00:00 2001 From: luxick Date: Mon, 8 Jun 2020 16:13:50 +0200 Subject: [PATCH] Fix encoding for pixctrl on c backend --- src/pixctrl.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pixctrl.nim b/src/pixctrl.nim index 35d51f8..981df16 100644 --- a/src/pixctrl.nim +++ b/src/pixctrl.nim @@ -1,8 +1,8 @@ -import strutils +import strutils, json import common when defined(js): - import ajax, jsconsole, dom, json + import ajax, jsconsole, dom else: import httpClient import argparse @@ -24,7 +24,7 @@ proc sendCommand(msg: CommandMessage) = req.send(cstring($(%*msg))) else: let client = newHttpClient() - let resp = client.post(randopixServer, $msg) + let resp = client.post(randopixServer, $(%msg)) if not resp.status.contains("200"): echo "Error while sending command: ", resp.status