wxpusher / wxpusher-client

微信消息实时推送服务[WxPusher],可以通过API实时给个人微信推送消息。wechat pusher.
http://wxpusher.zjiecode.com/demo
Apache License 2.0
746 stars 93 forks source link

post 和 get 都不能通过 #33

Closed HengyueLi closed 4 years ago

HengyueLi commented 4 years ago

post 返回:

{"code":1005,"msg":"服务器错误:Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported","data":null,"success":false}

这里测试已经在headers中添加了 ContentType:application/json

get 返回:

'{"code":1000,"msg":"处理成功","data":[{"uid":"UID_xxxx","topicId":null,"messageId":null,"code":1001,"status":"用户UID=[UID_xxxx]未关注应用,需要用户关注你创建的应用,你才可以给他推送消息"}],"success":true}'

HengyueLi commented 4 years ago

使用topic直接报错: '{"code":1000,"msg":"处理成功","data":[{"uid":null,"topicId":12,"messageId":null,"code":1001,"status":"你没有权限给topic【北京疫情】发送消息"}],"success":true}' 这都是啥啊?

zjiecode commented 4 years ago

post 返回:

{"code":1005,"msg":"服务器错误:Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported","data":null,"success":false}

这里测试已经在headers中添加了 ContentType:application/json

get 返回:

'{"code":1000,"msg":"处理成功","data":[{"uid":"UID_xxxx","topicId":null,"messageId":null,"code":1001,"status":"用户UID=[UID_xxxx]未关注应用,需要用户关注你创建的应用,你才可以给他推送消息"}],"success":true}'

这个提示已经非常明显,就是ContentType不对, header里面应该是 Content-Type ,有一个「-」

zjiecode commented 4 years ago

12 topicId=12 的这个主题,不是你自己创建的吧?需要自己创建的,你才有权限给发送消息。

HengyueLi commented 4 years ago

12 topicId=12 的这个主题,不是你自己创建的吧?需要自己创建的,你才有权限给发送消息。

感谢,之前把topicid和名字弄混了。