From 32716892d7e50a52ef3fff85dc01c82a3703c022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Mon, 16 Oct 2017 21:23:10 +0200 Subject: [PATCH] API client: Enforce https --- api/client/apiclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/client/apiclient.py b/api/client/apiclient.py index e6016db..2d01d7c 100644 --- a/api/client/apiclient.py +++ b/api/client/apiclient.py @@ -15,7 +15,7 @@ import sys def sendReq(url): def send(payload, host): try: - req = urllib.request.Request('http://{}/{}'.format(host, url), + req = urllib.request.Request('https://{}/{}'.format(host, url), json.dumps(payload).encode('ascii')) req.add_header('Content-Type', 'application/json') handle = urllib.request.urlopen(req)