Package com.drake.net.okhttp

Functions

setConverter
Link copied to clipboard
fun OkHttpClient.Builder.setConverter(converter: NetConverter): <ERROR CLASS>
转换器
setDebug
Link copied to clipboard
fun OkHttpClient.Builder.setDebug(enabled: Boolean, tag: String = NetConfig.TAG): <ERROR CLASS>
开启日志
setDialogFactory
Link copied to clipboard
fun OkHttpClient.Builder.setDialogFactory(dialogFactory: NetDialogFactory): <ERROR CLASS>
请求对话框构建工厂
setErrorHandler
Link copied to clipboard
fun OkHttpClient.Builder.setErrorHandler(handler: NetErrorHandler): <ERROR CLASS>
全局错误处理器
setRequestInterceptor
Link copied to clipboard
fun OkHttpClient.Builder.setRequestInterceptor(interceptor: RequestInterceptor): <ERROR CLASS>
添加轻量级的请求拦截器, 可以在每次请求之前修改参数或者客户端配置 该拦截器不同于OkHttp的Interceptor无需处理请求动作
setSSLCertificate
Link copied to clipboard
fun OkHttpClient.Builder.setSSLCertificate(trustManager: X509TrustManager?, bksFile: InputStream? = null, password: String? = null): <ERROR CLASS>
配置信任所有证书
fun OkHttpClient.Builder.setSSLCertificate(vararg certificates: InputStream, bksFile: InputStream? = null, password: String? = null): <ERROR CLASS>
配置信任所有证书
toNetOkhttp
Link copied to clipboard
fun OkHttpClient.toNetOkhttp(): <ERROR CLASS>
Net要求经过该函数处理创建特殊的OkHttpClient
fun OkHttpClient.Builder.toNetOkhttp(): <ERROR CLASS>
Net要求经过该函数处理创建特殊的OkHttpClient
trustSSLCertificate
Link copied to clipboard
fun OkHttpClient.Builder.trustSSLCertificate(): <ERROR CLASS>
信任所有证书