appid:wx255a826aded95333
调用接口代码如下:
HttpPost httpPost = new HttpPost(urlString);
httpPost.addHeader("Content-Type", "application/json;charset=utf-8");
httpPost.addHeader("Accept", "application/json");
HttpClient httpClient = HttpClientBuilder.create().build();
StringEntity entity = new StringEntity(param, Consts.UTF_8);
httpPost.setEntity(entity);
String result = "";
try{
HttpResponse response = httpClient.execute(httpPost);
result = EntityUtils.toString(response.getEntity());
System.out.println(result);
} catch (IOException e) {
e.printStackTrace();
}
具体传参打印下。看跟官方文档要求的传参是否一致
一般是传参格式不对。检查下吧。