getwxacode返回"{\"errcode\":47001,\"errmsg

发布于 6 年前作者 uyan16811 次浏览最后编辑 6 年前来自 ask

参数是:access_token=14_bTL7Y2hj8-TJ6_2-yg3vEBpGdGS2zFMGHT1nuo9jkNsyvqb0v0Zdx_DyYZTMos466MHsPuur8x6OPVPES5YV9DzlLmlycu73e6nYS_Xc7FmHPyDuGV3XKr8uEeowOxOBgxDy1S2tlzaEjVuLLAAbAFAODD&path=pages/index/index&auto_color=False&line_color={“r”:“0”,“g”:“0”,“b”:“0”}&is_hyaline=True,

返回了:{“errcode”:47001,“errmsg”:“data format error hint: [0.yP.a03230724]”}

不知道啥原因

4 回复
na87
na871 楼6 年前

赞同2楼的说法,body体中,方json格式的 参数: post.setEntity(new StringEntity(jsonObject.toString(), Charset.forName(“UTF-8”)));

pqian
pqian2 楼6 年前

你好,47001是格式不对,请检查发送的数据格式

xiuyingtang
xiuyingtang3 楼6 年前

用POST

leiyan
leiyan4 楼4 年前

API太难用了,参数和返回值说明都是一笔带过,不够详细