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错误码没有在文档里找到 请大佬们指条路
https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1433747234