Net

object Net

Functions

addDownloadListener
Link copied to clipboard
fun addDownloadListener(id: Any, progressListener: ProgressListener): Boolean
监听正在请求的下载进度
addUploadListener
Link copied to clipboard
fun addUploadListener(id: Any, progressListener: ProgressListener): Boolean
监听正在请求的上传进度
cancelAll
Link copied to clipboard
fun cancelAll()
取消全部网络请求
cancelGroup
Link copied to clipboard
fun cancelGroup(group: Any?): Boolean
根据分组取消网络请求
cancelId
Link copied to clipboard
fun cancelId(id: Any?): Boolean
取消指定的网络请求, Id理论上是唯一的, 所以该函数一次只能取消一个请求
debug
Link copied to clipboard
fun debug(message: Any)
输出异常日志
delete
Link copied to clipboard
fun delete(path: String, tag: Any? = null, block: BodyRequest.() -> Unit? = null): <ERROR CLASS>
同步网络请求
get
Link copied to clipboard
fun get(path: String, tag: Any? = null, block: UrlRequest.() -> Unit? = null): <ERROR CLASS>
同步网络请求
getRequestByGroup
Link copied to clipboard
fun getRequestByGroup(group: Any): MutableList<Request>
根据Group获取请求对象
getRequestById
Link copied to clipboard
fun getRequestById(id: Any): Request?
根据ID获取请求对象
head
Link copied to clipboard
fun head(path: String, tag: Any? = null, block: UrlRequest.() -> Unit? = null): <ERROR CLASS>
同步网络请求
options
Link copied to clipboard
fun options(path: String, tag: Any? = null, block: UrlRequest.() -> Unit? = null): <ERROR CLASS>
同步网络请求
patch
Link copied to clipboard
fun patch(path: String, tag: Any? = null, block: BodyRequest.() -> Unit? = null): <ERROR CLASS>
同步网络请求
post
Link copied to clipboard
fun post(path: String, tag: Any? = null, block: BodyRequest.() -> Unit? = null): <ERROR CLASS>
同步网络请求
put
Link copied to clipboard
fun put(path: String, tag: Any? = null, block: BodyRequest.() -> Unit? = null): <ERROR CLASS>
同步网络请求
removeDownloadListener
Link copied to clipboard
fun removeDownloadListener(id: Any, progressListener: ProgressListener): Boolean
删除正在请求的下载进度监听器
removeUploadListener
Link copied to clipboard
fun removeUploadListener(id: Any, progressListener: ProgressListener): Boolean
删除正在请求的上传进度监听器
trace
Link copied to clipboard
fun trace(path: String, tag: Any? = null, block: UrlRequest.() -> Unit? = null): <ERROR CLASS>
同步网络请求