From 70165413a58c16dc6910a2b006f5dec56f82780e Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Sat, 24 Oct 2020 11:44:06 +0200 Subject: [PATCH] Fix request body data --- kumisms/__init__.py | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kumisms/__init__.py b/kumisms/__init__.py index 303c5d0..f4952c8 100644 --- a/kumisms/__init__.py +++ b/kumisms/__init__.py @@ -42,7 +42,7 @@ class KumiSMS: def _request(self, url, data={}): data.update({"key": self.key}) - body = json.dumps(data) + body = json.dumps(data).encode() request = urllib.request.urlopen(url, body) content = json.loads(request.read()) if content["status"] == "error": diff --git a/setup.cfg b/setup.cfg index a61b157..60def55 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = kumisms -version = 0.1.2 +version = 0.1.3 description = Class to interact with KumiSMS long_description = file: README.md url = https://kumig.it/kumisystems/pykumisms