文档显示org.apache.http.entity.mime.MultipartEntity
类已被弃用。请问有没有人能够推荐替代方案?
我在我的代码中使用它如下:
entity.addPart("params", new StringBody("{\"auth\":{\"key\":\""
+ authKey + "\"},\"template_id\":\"" + templateId + "\"}"));
entity.addPart("my_file", new FileBody(image));
httppost.setEntity(entity);
HttpEntity
现在也已经被弃用了。所以不能使用builder.build()
。有什么替代方案吗? - Ankur Raiyani