OkHttpManager

OkHttpManager使用 OkHttpClient 实现的 IHttpManager

使用 OkHttpManager 时必须依赖 OkHttp 库

Author

Jenly

Constructors

Link copied to clipboard
constructor(timeout: Int)
HttpManager对外暴露。如果没有特殊需求,推荐使用getInstance
constructor(@NonNull okHttpClient: OkHttpClient)
HttpManager对外暴露,推荐使用getInstance

Functions

Link copied to clipboard
open fun cancel()
取消下载
Link copied to clipboard
open fun download(url: String, saveFilePath: String, @Nullable requestProperty: Map<String, String>, callback: IHttpManager.DownloadCallback)
下载
Link copied to clipboard