OkHttp3 source code (I) ---- OkHttpClient

The internal implementation process of OkHttp3 was not considered when it was used before. Today, I will sort out and record it. Next, I will add the common methods, internal classes and fields in the OkHttpClient class with my own understanding of comments, and understand the main purpose of OkHttpClient by looking at the com ...

Added by nnpdn on Sat, 04 Apr 2020 18:24:50 +0300

Android-App Detection Upgrade Library

QuiteVersion For Android App detection of automatic updates Achieving results Add Dependency implementation 'com.xwdz:QuiteVersion:0.0.4' implementation 'com.xwdz:okHttpUtils:1.0.4' //Ignorable if dependent implementation 'com.squareup.okhttp3:okhttp:3.5.0' Characteristic Callable anywhere Suppo ...

Added by trilbyfish on Fri, 06 Mar 2020 18:09:52 +0200

Free at home?Look at EventBus parsing and write EventBus with me

Preface Originally notified to resume work this Monday, it seemed that things were not simple, and it was postponed to next week's 1, but I still had to work from home for some time. Yesterday, some fans asked me why I didn't change my mind. Yesterday, I went to the company in batches for an afternoon meeting. All the people in batches had mas ...

Added by tipjones on Wed, 19 Feb 2020 04:28:06 +0200

Solving the avalanche problem by fusing Hystix

1. Thread isolation, service degradation (degradation by the consumer of the service) When the service is busy, if there is an exception in the service, it is not a rude direct error report, but a friendly prompt will be returned. Although the user's access is denied, a result will be returned. It's like going to buy fish. Usually the supermark ...

Added by shab620 on Thu, 21 Nov 2019 21:45:39 +0200

OkHttp3 source code details cache strategy

Reasonable use of local cache can effectively reduce network overhead and response delay. The HTTP header also defines many cache related domains to control the cache. Let's talk about the implementation details of the cache part in OkHttp today. HTTP cache policyFirst of all, let's understand the related domains of the cache part in the HTTP p ...

Added by Fog Juice on Mon, 18 Nov 2019 11:58:13 +0200

Okhttp3 Source Parsing-Interceptor RetryAndFollowUpInterceptor

Preface Review: Basic usage of Okhttp Okhttp3 Source Parsing (1)-OkHttpClient Analysis Okhttp3 Source Parsing (2)-Request Analysis Okhttp3 Source Parsing (3)-Call Analysis (Overall Process) Okhttp3 Source Parsing (4) - Interceptor and Design Mode The previous section talks about interceptors and design patterns, and today we talk about RetryAnd ...

Added by Dvorak on Thu, 29 Aug 2019 03:53:51 +0300

The Simple Use of OkHttp and Source Code Analysis

Articles Catalogue Simple use Source code analysis Overall architecture brief introduction Interface - Interface Layer Protocol - Protocol Layer Connection -- Connection Layer Cache - Cache layer: Managing local caches I/O-I/O Layer: Realization of Real Data Reading and Writing Inteceptor - Interce ...

Added by imstupid on Mon, 12 Aug 2019 12:32:45 +0300

okgo Learning Notes: Global Configuration

#okgo Learning Notes (1): Global Configuration Role: Note use.Original Detailed Development Document Address: https://github.com/jeasonlzy/okhttp-OkGo/wiki/Init Initialization method Typically configured in Aplication or base class, it only needs to be called once log switch can be configured Global ...

Added by oshecho on Mon, 12 Aug 2019 04:59:16 +0300

Android Network Request 4--Parsing Retrofit Source Code

Articles Catalogue 1. Introduction to Retrofit 2. Retrofit usage (asynchronous) 2.1 Adding Dependencies 2.2 Adding Network Permissions 2.3 Create a class for receiving server to return data 2.4 Create an interface for describing network requests 2.5 Create Retrofit instances 2.6 Creating an Example ...

Added by Alanmoss on Tue, 06 Aug 2019 12:53:25 +0300

Android Encapsulates Rxjava2+Retrofit Perfectly

I learned the basic usage of Rxjava and Retrofit last year, but I haven't used them in actual projects.Starting a new project this year, we decisively introduced RxJava and Retrofit into the new project.This article describes the author's encapsulation of Retrofit in the project.Let's first see how Retrofit works after encapsulation. RetrofitH ...

Added by celebx on Tue, 06 Aug 2019 04:13:25 +0300