RxHttp, a more elegant collaborative process experience than Retrofit

1. ForewordPeople keep asking me, RxHttp What are the advantages over Retrofit? Here, I would like to talk about my ideas in terms of stability, functionality and ease of use.First of all, let me state that the emergence of RxHttp is not to kill anyone, but to give you more choices and different choices.stabilityI always think that Retrofit is ...

Posted by maff20 on Tue, 25 Jan 2022 11:11:17 +0100

Android okhttp + retro fit + rxjava + hit implements the network request framework

🔥 introduce This paper implements a network request box through okhttp + retrofit + rxjava + hit. 💥 Final code         iWanAndroidService.register(map)                 .compose(ResponseTransformer.obtain())                 .subscribe(registerData -> {                     //Request succeeded                 }, new ErrorConsumer() {     ...

Posted by WhiteHawksan on Wed, 17 Nov 2021 12:30:21 +0100

Simple combination of Retrofit and OkHttp

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

Self made certificate of Android HTTPS realizes bidirectional authentication (OkHttp + Retrofit + Rxjava)

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

Record of Retrofit+MVP framework encapsulation

The most popular combination of network requests, retrofit2+okhttp+rxjava+mvp This is the sealed record First, it is divided into modules, such as login First, the use of encapsulation package com.fragmentapp.login.presenter; import android.util.Log; import com.fragmentapp.base.BasePresenter; import com.fragmentapp.http.BaseObserver; impor ...

Posted by jredwilli on Sat, 02 May 2020 08:14:47 +0200

Retrofit+SwipeRefreshlayout+RecyclerView to implement pull-up refresh and paging load

Preface: In the process of project development, we usually have the demand of "paging load". Paging load is to display data in the form of list. On the premise of having a network, we can manually obtain more data through pull-down refresh. When there is no more data, we will be reminded that we do not have more data.     & ...

Posted by jakeklem on Fri, 03 Apr 2020 03:29:53 +0200

At a glance: steps to build Retrofit2+RxJava2+ButterKnife framework

Step introduction: Code resolution: Step introduction: Add dependencies for Retrofit2 and RxJava2 libraries: Create a class that accepts the data returned by the server (the class used to process the data) Create an interface to describe network requests and configure network request parameters Create Retrofit inst ...

Posted by mobilekid on Thu, 02 Apr 2020 16:10:36 +0200

Solve the problem of using Okhttp+Retrofit to send network request and get json is unicode

When we use Okhttp and Retrofit to send network requests, the man in the json we get is unicode code, as shown in the figure below At this time, we need to set the network editor when Okhttp is initialized, and change the return value code to UTF-8 OKhttp previously set HttpLoggingInterceptor logging = new HttpLogg ...

Posted by davidb on Fri, 03 Jan 2020 01:59:46 +0100

The implementation of Okhttp multi network communication

In recent project requirements, android needs to be able to access the internal and external networks at the same time, that is, different communications go through different networks, and it is feasible to check relevant information, but certain conditions are required 1. Prerequisites: 1) android system version on the cont ...

Posted by jordan00 on Wed, 01 Jan 2020 10:22:38 +0100

Using Kotlin to write basic network requests

The source download link has been given at the end of the article First, add the dependency required by the network request to build.gradle: //Retrofit implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.squareup.retrofit2:converter-gson:2.4.0' implementation "com.squareup.retrofit2:adapt ...

Posted by deolsabh on Wed, 18 Dec 2019 18:35:07 +0100