Before analyzing the core processes of OkHttp and the core classes, let's clarify two concepts: one is the builder mode used by OkHttpClient and Request when they are created; The other is the interceptor mode responsible for response processing;
Analysis of builder mode of OkHttpClient/Request
The builder (also known as the b ...
okhttp can be said to be the most frequently asked third-party framework in the interview. It should be said that there is no one. It's just time to review and split this third-party library while looking for a job.
Part I: design patterns used
1. Builder mode: such as OkHttpClient and Request. Why use the builder model? The use feature of ...
Posted by eyedol on Sat, 19 Feb 2022 16:45:51 +0100
1. What is OkHttp
1. Network request development
Advantages and disadvantages of Http request Library in history
HttpURLConnection—>Apache HTTP Client—>Volley—->okHttp
2. Project open source address
3. What is OkHttp
OKhttp is an open source project of network request. And ...
Posted by geek_girl_2020 on Sat, 29 Jan 2022 16:34:34 +0100
prefaceThis article is a detailed analysis of the OkHttp open source library. If you feel you don't know enough about OkHttp, you want to learn more. I believe this article will be helpful to you.This article contains a detailed analysis of the request process, the interpretation of major interceptors and a summary of my reflection. The article ...
Posted by akrocks_extreme on Thu, 16 Dec 2021 18:05:44 +0100
OKHttp3 is a java and Android network SDK that supports http1 and http2 network protocols. OKHttp relies on OKIO.
1,OKHttpClient The OKHttpClient class combines multiple objects, implements the Call.Factory interface, provides a newCall method, and returns realcall (the specific implementation class of call). It ...
Posted by storyteller on Fri, 17 Sep 2021 19:54:11 +0200
These days, the development of external SDK, can achieve landing, payment.Similar to developing a set of QQ, WeChat third party login.The authorization protocol used is OAuth 2.0.Among them, Http Authentication is used, and you can consult the online materials. There are all kinds of answers, some don't know if they have been verified, and some ...
Posted by bradleybebad on Fri, 10 Jul 2020 16:54:06 +0200
Write in front
There are not a few articles about qiniu cloud uploading pictures, but they just use the test domain name given by qiniu cloud. As a webmaster, after upgrading his domain name to https, the obsessive-compulsive patients are not allowed to have the three words of insecurity in the brow ...
Posted by Salis on Wed, 17 Jun 2020 08:52:21 +0200
In our request network, there are many kinds of network request modes, so two kinds of network request modes, Retrofit and OkHttp, can be used together. Both Retrofit and OkHttp are released by Square company. The bottom layer of Retrofit encapsulates OkHttp. I use MVP mode here to encapsulate a network request~~
Custom tool class
public cla ...
Posted by jbulaswad on Sun, 31 May 2020 19:11:27 +0200
Due to a high security project to be done recently, it needs to use HTTPS for two-way authentication. When designing the project architecture, the client uses MVVM architecture, and realizes Android based on DataBinding + Retrofit + Rxjava.
Looking up a lot of data, there are many examples of implementing two-way authentication based on native ...
Posted by okyejr on Thu, 21 May 2020 06:36:59 +0200