Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
clm0081 opened this issue Aug 5, 2023 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@clm0081
Copy link

clm0081 commented Aug 5, 2023

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

@clm0081 clm0081 added the enhancement New feature or request label Aug 5, 2023
@songquanpeng
Copy link
Owner

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

@clm0081
Copy link
Author

clm0081 commented Aug 8, 2023

{"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
Copy link
Author

clm0081 commented Aug 8, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants