songquanpeng / message-pusher

搭建专属于你的消息推送服务,支持多种消息推送方式,支持 Markdown,基于 Golang 仅单可执行文件,开箱即用
https://msgpusher.com
MIT License
2.64k stars 395 forks source link

宝塔云监控推送的消息,解析后提示解析json失败。 #110

Open clm0081 opened 1 year ago

clm0081 commented 1 year ago

有一个服务器状态监控平台 宝塔云监控 它的消息推送,中文格式是类似 "\u60a8\u6b63\u5728\u5b9d" 这样的,发送到msg-pusher后会提示解析json失败,导致无法推送,如果您有空的话,麻烦帮忙看一下,如果需要的话,我这里有抓的包。另外,是否可以增加一个msgtype为text的模式,有些推送的消息,我只想它是消息文字。

songquanpeng commented 1 year ago

可以发一下完整的请求体吗?

clm0081 commented 1 year ago

{"msg_type": "text", "content": {"text": "\u60a8\u6b63\u5728\u5b9d\u5854\u4e91\u5b89\u5168\u76d1\u63a7\u8fdb\u884c\u544a\u8b66\u901a\u77e5\u6d4b\u8bd5\u64cd\u4f5c\uff0c\u5982\u975e\u60a8\u672c\u4eba\u64cd\u4f5c\uff0c\u8bf7\u5ffd\u7565\u6b64\u6d88\u606f\u3002\n\u82e5\u60a8\u6536\u5230\u6b64\u6d88\u606f\uff0c\u8bc1\u660e\u60a8\u7684\u914d\u7f6e\u6b63\u786e\uff0c\u4e14\u53ef\u4ee5\u6b63\u5e38\u6536\u53d1\u6d88\u606f\u3002"}}

clm0081 commented 1 year ago

POST /webhook/(mytoken) HTTP/1.1 Host: (mywebsite) User-Agent: python-requests/2.26.0 Accept-Encoding: gzip, deflate, br Accept: / Connection: keep-alive Content-Type: application/json Content-Length: 425