Fix encoding for pixctrl on c backend
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user