O'Reilly logo

Reactive Android Programming by Tadas Subonis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Making HTTP requests

Before we can start making requests, we need to build a Retrofit object that will be used to create services. For this purpose, we will create a class, called RetrofitYahooServiceFactory, to create a Retrofit object and then service interface objects that will be used to make queries.

The following examples assume that in the end, we want to query this URL:

At first look, it may seem a bit too convoluted, but by taking everything apart we will show how Retrofit can help us to make HTTP requests in this case.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required