okhttp異步網絡請求流程

1.OkHttpClient進行配置,通過new一個RealCall得到一個Call; 2.enqueue進行異步請求,dispatcher會將其分配到線程池進行處理; 3.Intercepter使用責任鏈模式進行請求處理:   3.1.BridgeInterceptor請求的參數封裝配置;   3.2.CacheInterceptor進行緩存處理,判斷是否使用緩存;   3.3.ConnectI
相關文章
相關標籤/搜索