Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Robusta sends a plain text payload without formating
Browse files Browse the repository at this point in the history
  • Loading branch information
hostmaster committed Oct 5, 2023
1 parent 15622e5 commit b0380db
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ def do_POST(self): # pylint: disable=invalid-name
"""Handles HTTP POST requests."""
content_length = int(self.headers["Content-Length"])
post_data = self.rfile.read(content_length)
data = loads(post_data.decode("utf-8"))
print(f"POST body ({data})")
data = post_data.decode("utf-8")

self.google_chat.send("Test message")
self.google_chat.send(data)

self._send_response(
200, headers=(("Content-type", "%s; charset=utf-8" % "text/html"),)
Expand Down

0 comments on commit b0380db

Please sign in to comment.