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

post接口调用出现问题 #6

Open
kewenzhong opened this issue May 20, 2021 · 0 comments
Open

post接口调用出现问题 #6

kewenzhong opened this issue May 20, 2021 · 0 comments

Comments

@kewenzhong
Copy link

代码:
url = 'http://wxpusher.zjiecode.com/api/send/message/'
headers = {
'User-Agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
'Content-Type': 'application/json'
}
payload = {
"appToken": "AT_kDV9PtZL17KqeFXaqbouFxB7pyOs165j",
"content": "Wxpusher祝你中秋节快乐!",
"summary": "消息摘要", # 消息摘要,显示在微信聊天页面或者模版消息卡片上,限制长度100,可以不传,不传默认截取content前面的内容。
# 内容类型 1表示文字 2表示html(只发送body标签内部的数据即可,不包括body标签) 3表示markdown
"contentType": 1,
"topicIds": [ # 发送目标的topicId,是一个数组!!!,也就是群发,使用uids单发的时候, 可以不传。

    ],
    "uids": [  # 发送目标的UID,是一个数组。注意uids和topicIds可以同时填写,也可以只填写一个。
        "UID_IcNAIjROboUwZL9OMcdZRCmYYJv8"
    ],
    # 'uid': 'UID_IcNAIjROboUwZL9OMcdZRCmYYJv8',
    "url": "http://wxpusher.zjiecode.com"  # 原文链接,可选参数
}
resp = requests.post(url, headers=headers, params=payload)
print(resp.text)

结果:
{"code":1005,"msg":"接口 [/api/send/message/] 出现异常:Required request body is missing: public com.zjiecode.wxpusher.common.base.result.Result com.zjiecode.wxpusher.server.biz.controller.app.SendController.postSendMessage(com.zjiecode.wxpusher.server.biz.bean.SendMessageReq)","data":null,"success":false}

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

No branches or pull requests

1 participant