Android SDK25的多部分请求

时间:2017-03-05 00:56:53

标签: android multipartform-data

我发送多部分请求的所有搜索结果都需要HttpClient,这显然已在SDK23中删除了。修复此问题是导入旧库。

从SDK25开始,什么是正确的"如何在不导入此类遗留库的情况下执行此操作?

如果它有所不同,我会在我的请求中发送文件和JSON。

1 个答案:

答案 0 :(得分:0)

使用refrofit2发出此类请求。https://futurestud.io/tutorials/retrofit-how-to-upload-files。或者使用okHTTP3客户端。http://square.github.io/okhttp/

相关问题