Your code encode string into utf-8 bytes.
But when "endspace-a0" is sent, utf-8 encoding encode \xA0 into \xc2\xa0.
So, it will probably result in incorrect diagnosis
therefore, I suggest you that fix the below code into plain text because HTTP protocol sends a plain text.
|
web.send(str(payload_obj).encode()) |
Suggestion:
web.send(str(payload_obj))
