# NetCallback

abstract class NetCallback<T> : Callback
Content copied to clipboard

提供泛型转换特性 相对于OkHttp的Callback新增三个回调函数: onSuccess onComplete 这三个函数都运行在主线程上

## Constructors

NetCallback
Link copied to clipboard
fun NetCallback()
Content copied to clipboard

## Functions

onComplete
Link copied to clipboard
open fun onComplete(call: Call, e: IOException?)
Content copied to clipboard
请求完成
onError
Link copied to clipboard
open fun onError(call: Call, e: IOException)
Content copied to clipboard
请求错误
onFailure
Link copied to clipboard
open override fun onFailure(call: Call, e: IOException)
Content copied to clipboard
onResponse
Link copied to clipboard
open override fun onResponse(call: Call, response: Response)
Content copied to clipboard
onSuccess
Link copied to clipboard
abstract fun onSuccess(call: Call, result: T)
Content copied to clipboard
请求成功