aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-07-25 12:17:54 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-07-29 16:54:21 -0400
commit69d9497df325b0ea7ef71824f7106ae09fcbcdbb (patch)
tree23677aa02d8e6054a26b69a4b5cef2892ad9e69b
parent60aa05829fb3de744d8ef406b62bbdd26fb8c44b (diff)
downloadkutter-69d9497df325b0ea7ef71824f7106ae09fcbcdbb.tar.gz
kutter-69d9497df325b0ea7ef71824f7106ae09fcbcdbb.tar.xz
kutter-69d9497df325b0ea7ef71824f7106ae09fcbcdbb.zip
webhooks: Remove spaces from json messages sent on api server
Reduce the bandwidth slightly by removing unnecessary spaces in messages. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--klippy/webhooks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/klippy/webhooks.py b/klippy/webhooks.py
index 2deed429..3865d0d6 100644
--- a/klippy/webhooks.py
+++ b/klippy/webhooks.py
@@ -237,7 +237,7 @@ class ClientConnection:
self.send(result)
def send(self, data):
- self.send_buffer += json.dumps(data) + "\x03"
+ self.send_buffer += json.dumps(data, separators=(',', ':')) + "\x03"
if not self.is_sending_data:
self.is_sending_data = True
self.reactor.register_callback(self._do_send)