Skip to content

post接口调用出现问题 #6

@kewenzhong

Description

@kewenzhong

代码:
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}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions