收藏
回答

调用内容安全接口一直调用不通,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]"}


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

2 个回答

登录 后发表内容
问题标签