[note] encapsulate the pit encountered by okhttp + rtofit + rxjava + simplexml

First of all, in the context of this new project, the docking Party's high cold exception, all the requests and returns are in XML format, so I'm very tired. At present, the company doesn't have any well packaged network request package. Thinking of the RXjava used in the past, it just picked it up a ...

Posted by Desertwar on Wed, 19 Feb 2020 23:37:39 -0800

Retrofit of third party open source library

Current version: 2.7.1 Official document: https://square.github.io/retrofit/Retrofit It is a RESTful encapsulation of HTTP network request framework. brief introduction Use Add a dependency on the Retrofit Library rely on dependencies { ... implementation 'com.squareup.retrofit2:retrofi ...

Posted by Sgt.Angel on Tue, 11 Feb 2020 09:26:35 -0800

Android advanced notes -- Retrofit source code analysis

Article directory I. information Two, introduction Three. Introduction 4, Source code analysis 4.1. Create retrofit 4.1.1. Building 4.1.2. Add baseUrl 4.1.3. Add GsonConverterFactory 4.1.4.build() 4.2. Create network request 4.3. Call the network request API, generate a call, and execute the reque ...

Posted by jandrews on Wed, 29 Jan 2020 04:17:57 -0800

Source analysis of Android mainstream triplet libraries (3. Deep understanding of Glide source)

Preface To be a great Android developer, you need a complete Knowledge System Here, let's grow up as we want. tips: articles are too long to favor your collection first, then read them slowly ~ In the first two chapters, we have analyzed the core source code of OKHttp, the underlying framework of A ...

Posted by GetReady on Thu, 16 Jan 2020 18:29:25 -0800

The MVP mode + Retrofit2.0 framework encapsulation of kotlin & Java Android Development

Recently, I have been looking at Kotlin's Android code. By comparing Java, Kotlin is indeed a trend. Today, I will introduce how to integrate network requests into MVP mode. Some people may have a good understanding of some conceptual things, but the actual operation is another matter... This time, I ...

Posted by alexweb on Sat, 11 Jan 2020 05:20:17 -0800

RxJava source code parsing back pressure + source code + synchronous asynchronous + principle

Article 3 of the seriesTo undertake the above: RXjava parsing (2) I gave you the source code of RXjava and this interview, and you told me that I couldn't get an offer?(leave the GitHub link, and you can find the content you need to obtain such as interview)https://github.com/xiangjiana/Android-MS Back pressure problem Backpressure refers to ...

Posted by info@ipfaces.org on Fri, 10 Jan 2020 07:09:03 -0800

Feign source code learning

feign introduction Feign is a Restful client component of Java. Feign makes it easier to write Java HTTP client. Feign was inspired by Retrofit, JAXRS-2.0 and WebSocket. Feign has nearly 3K stars on github, which is a quite excellent open source component. Although it is inferior to nearly 30K stars of Retrofit, spring cloud integrates feign, w ...

Posted by jfgreco915 on Mon, 23 Dec 2019 02:05:29 -0800

Combination of Retrofit and RxJava

These two frameworks are very popular now. The combination of strong and strong forces makes our efficiency more direct First, we need to import the dependencies implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.squareup.okhttp3:okhttp:3.11.0' implementation 'com.google.code.gson:gson:2.8. ...

Posted by 25lez25 on Tue, 17 Dec 2019 10:14:25 -0800

Retrofit source reading

1. A common network request process in development url, parameter -- > request -- > Convert to Http protocol -- > request execution -- > return result -- > Convert to response -- > response convert to our object Only the head and tail are customized by our daily development, and other processes in the middle are carried out ...

Posted by hankster on Mon, 16 Dec 2019 04:55:18 -0800

Java Retrofit2 use -- custom converter

For the basic use of Retrofit2, please refer to Java Retrofit2 uses Custom converter By default, the supported conversions of retrofit are Gson,Jackson,Moshi Build infrastructure Here, we will customize a FastJsonConverterFactory to parse the returned data, which internally uses Alibaba's fastjson (depends on adding compile 'com.a ...

Posted by Memphis10 on Wed, 11 Dec 2019 07:42:17 -0800