Categories Retrofit

21 posts

Auto Added by WPeMatico

🌟 Retrofit 2 β€” Loading Data into RecyclerView and CardView

Retrofit is an excellent library to load data from an API or website. In a previous tutorial, you’ve learned how to load data from Wikipedia with jspoon. However, we didn’t cover displaying that data. In this tutorial, you’ll use a RecyclerView to display the section titles of a parsed Wikipedia […]

🌟 Retrofit 2 β€” Debug and Compare Requests with RequestBin

One of the most commonly asked questions in our email inboxes and comment sections is about API requests not working. The request works on another client (iOS app, Postman tool, …), but not with Retrofit on Android. Our usual suggestion is to add logging via OkHttp interceptor or via Stetho […]

Java Basics for Retrofit β€” Fluent Interface with Builders

Every good software product follows some architecture and implementation patterns. In the past few decades, a lot of different ideas emerged. New and even experienced developers can still be overwhelmed by the amount of different patterns and when they should be applied. In this tutorial we’ll introduce you to two […]

Effective Networking On Android using Retrofit, Rx and Architecture Components

For many, like me, Retrofit is the go-to library on Android to talk to their REST APIs. Retrofit also supports adapters to convert your API responses into Reactive Streams. Reactive streams, among other things, help you handle threading effectively. This makes your Android application robust, stable and development faster. For […]

🌟 Retrofit 2 β€” How to Integrate Guava Call Adapter

In the past tutorials, you’ve learned the basics of Retrofit call adapters, how to integrate RxJava 1.x interfaces and RxJava 2.x interfaces to your Retrofit callbacks. In this tutorial, you’ll learn how to integrate Retrofit’s request callbacks into your Guava flow. To continue reading this premium tutorial go to! […]

Retrofit 2 β€” Share OkHttp Client and Converters between Retrofit Instances

Using Retrofit for your Android app’s networking can make your life so much easier. However, Retrofit’s design requires a single Retrofit instance for each API with a different base URL. Consequently, if your app is talking to two or more APIs (under different URLs), you’ll need to deal with at […]

Retrofit 2 β€” Beyond Android: Retrofit for Java Projects

We’ve tailored our 80+ tutorials on Retrofit to the Android platform. The snippets and examples are usually specifically written for Android apps. But that doesn’t do Retrofit justice. Retrofit supports any regular Java project, not just on the Android platform. Even though you can implement the vast majority of our […]