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 import common
when defined(js): when defined(js):
import ajax, jsconsole, dom, json import ajax, jsconsole, dom
else: else:
import httpClient import httpClient
import argparse import argparse
@@ -24,7 +24,7 @@ proc sendCommand(msg: CommandMessage) =
req.send(cstring($(%*msg))) req.send(cstring($(%*msg)))
else: else:
let client = newHttpClient() let client = newHttpClient()
let resp = client.post(randopixServer, $msg) let resp = client.post(randopixServer, $(%msg))
if not resp.status.contains("200"): if not resp.status.contains("200"):
echo "Error while sending command: ", resp.status echo "Error while sending command: ", resp.status