收藏
回答

内容安全接口 data format error ?

Post请求代码:

String url=String.format("https://api.weixin.qq.com/wxa/msg_sec_check?access_token=%s", access_token);
try {
URIBuilder builder = new URIBuilder(url);
URI uri = builder.build();
HttpPost httpPost = new HttpPost(uri);
StringEntity s = new StringEntity(content, "utf-8");
s.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
httpPost.setEntity(s);
httpPost.setHeader("Content-type", "application/json");
response = httpclient.execute(httpPost);
if (response.getStatusLine().getStatusCode() == 200) {
resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
}
} catch (Exception e) {
e.printStackTrace();
}

后台请求后获取到如下JSON:{"errcode":47001,"errmsg":"data format error hint: [T8SpSa04594711]"}


47001错误码没有在文档里找到 请大佬们指条路

回答关注问题邀请回答
收藏

1 个回答

  • 猎人
    猎人
    2019-08-09

    https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1433747234

    2019-08-09
    有用
    回复 3
    • Benk
      Benk
      2019-08-09
      {"address":"1","goodname":"1","comment":"1","goodtype":"1","contractmethod":"1","standard":"1","goodnum":1,"pictureArray":"[]"}
      2019-08-09
      回复
    • Benk
      Benk
      2019-08-09
      这是我的json格式 是前端JSON.stringify方法得到的 应该不会错
      2019-08-09
      回复
    • 猎人
      猎人
      2019-08-09回复Benk
      你测试测试吧 根据文档判断是格式问题的
      2019-08-09
      回复
登录 后发表内容
问题标签