okhttp源码流程图
2019-08-14 11:55:31 0 举报
Okhttp源码流程图
作者其他创作
大纲/内容
CacheInterceptor
处理连接
Interceptor
BridgeInterceptor
CallServerInterceptor
分发器,将Call放入对应的队列中
header
OkHttpClient
添加默认请求头
body
Response
getResponseWithInterceptorChain()
url
execute
newCall
method
处理缓存
code
RealCall
OkHttpClientBuilder
enqueue
网络拦截器
RetryAndFollowUpInter
Dispatcher.execute
保存cookie和解压(如果需要)
networkInterceptors
Build
Dispatcher.enqueue
错误重试和重定向
发起网络请求,获得Response
进入拦截器链中
ConnectInterceptor
收藏
0 条评论
下一页