收藏
回答

调用内容安全接口一直调用不通,java各种方式都试了一直返回47001?

try {
HttpClient httpclient = new DefaultHttpClient();
   HttpPost httpPost = new HttpPost(sendUrl);
   File uploadFile = new File("/Users/ethan/Downloads/test.jpg");

   FileBody uploadFilePart = new FileBody(uploadFile);
   MultipartEntity reqEntity = new MultipartEntity();
   reqEntity.addPart("media", uploadFilePart);
   httpPost.setEntity(reqEntity);
   HttpResponse response = httpclient.execute(httpPost);

   HttpEntity entity = response.getEntity();
   if(entity!=null){
String result = EntityUtils.toString(entity,"UTF-8");
       System.out.println(result);

   }
}catch (Exception e){
e.printStackTrace();
}


一直返回

{"errcode":47001,"errmsg":"data format error hint: [SAESjA04011548]"}


最后一次编辑于  09-26
回答关注问题邀请回答
收藏

1 个回答

问题标签