java - 如何传递到请求文件列表
问题描述
我使用org.apache.http
库来传递文件列表。我得到异常 java.lang.IllegalArgumentException: partBoundary may not be empty
我不明白这个异常是什么意思。我使用依赖build.gradle
:
android {
compileSdkVersion 29
useLibrary 'org.apache.http.legacy'
}
我在这个代码部分得到了异常:
try {
InputStream is = null;
if (http instanceof HttpPost) {
if (((HttpPost) http).getEntity() != null) {
is = ((HttpPost) http).getEntity().getContent(); // exception is here
}
解决方案
推荐阅读
- objective-c - Objective-C:获取两个日期之间的日历天数
- java - 如何使用java生成带有测试数据的图表?
- ios - iOS - 接听电话时 AudioKit 崩溃
- python-3.x - python格式化问题解析子元素
- java - 从 SpringBoot 获取 protobuf 消息对象列表
- sql-server - Visual Studio 数据库项目参考
- java - com.googlecode.objectify.LoadException:时间戳超出范围错误
- azure - SignalR - 验证用户
- oauth-2.0 - Swagger:授权令牌未传递到请求标头中
- python - 如何从python中的整数生成列表?