mirror of https://github.com/Desuuuu/klipper.git
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>
This commit is contained in:
parent
60aa05829f
commit
69d9497df3
|
@ -237,7 +237,7 @@ class ClientConnection:
|
||||||
self.send(result)
|
self.send(result)
|
||||||
|
|
||||||
def send(self, data):
|
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:
|
if not self.is_sending_data:
|
||||||
self.is_sending_data = True
|
self.is_sending_data = True
|
||||||
self.reactor.register_callback(self._do_send)
|
self.reactor.register_callback(self._do_send)
|
||||||
|
|
Loading…
Reference in New Issue