net / com.drake.net / NetConfig
object NetConfig
Net的全局配置
Name | Summary |
---|---|
app | 全局上下文, 一般执行initNet即可, 无需手动赋值lateinit var app: Application |
host | 全局的域名或者ip(baseUrl)lateinit var host: String |
onDialog | 全局加载框var onDialog: DialogCoroutineScope .(FragmentActivity) -> Dialog |
onError | 全局错误处理var onError: Throwable .() -> Unit |
onStateError | 全局缺省页错误处理var onStateError: Throwable .(view: View ) -> Unit |