首页 > 解决方案 > 如何传递到请求文件列表

问题描述

我使用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
                }

标签: javaandroidhttprequest

解决方案


推荐阅读