Fix encoding for pixctrl on c backend

This commit is contained in:
2020-06-08 16:13:50 +02:00
parent 3a29ffad57
commit 2aa73f581f

View File

@@ -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