|
@@ -111,18 +111,6 @@ public class HttpPoolClient {
|
|
|
return request(httpPost);
|
|
|
}
|
|
|
|
|
|
- public String post(String url, InputStream inputStream, String fileName) throws IOException {
|
|
|
- HttpPost httpPost = new HttpPost(url);
|
|
|
- MultipartEntityBuilder entity = MultipartEntityBuilder.create();
|
|
|
- entity.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
|
|
|
- entity.setCharset(StandardCharsets.UTF_8);
|
|
|
- entity.addBinaryBody("media", inputStream, ContentType.MULTIPART_FORM_DATA, fileName);
|
|
|
- httpPost.setEntity(entity.build());
|
|
|
-
|
|
|
-
|
|
|
- return request(httpPost);
|
|
|
- }
|
|
|
-
|
|
|
public String post(String url, File file) throws IOException {
|
|
|
HttpPost uploadFile = new HttpPost(url);
|
|
|
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|