# Net

object Net
Content copied to clipboard

## Functions

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