For Retrofit beginners: get your feet wet and execute your first requests
In this learning path you’ll learn how to setup your first Retrofit request, how to interact with an API, how to convert XML and JSON payloads, various parameters and more. If you’re new to Retrofit, this is the learning path for you!
Learn the basics of Retrofit and create your first Android client for API or HTTP requests. You’ll get an overview over Retrofit, add necessary dependencies to your build, and implement a demo request to the GitHub API.
Learn in detail how to describe all kinds of API endpoints in Retrofit.
Get to know our implementation of a clean, stable and sustainable Android client: the ServiceGenerator.
Learn how to perform the actual requests in either way: synchronous or asynchronous. We’ll also show you the implications of using the synchronous requests on Android.
Retrofit handles the relationship between API base URL and request endpoint URL in a logical manner. You’ll learn in detail how Retrofit assembles complete URLs.
Learn how to define and send Java objects in an HTTP request body with Retrofit.
Get to know all provided standard converters and how to use them for mapping from and to various standard formats.
Learn how to integrate and customize the Gson converter to map all of your JSON request and responses automatically.
Still using XML for REST? Learn how to integrate an XML converter to map HTTP responses from XML to Java (and vice versa).
You want to know what exactly Retrofit is receiving and sending to your server? Learn how to add a logging interceptor to your Android app.
Learn how to use Retrofit to add (optional) query parameters to your requests.
Learn how to use (optional) path parameters to refine your request for single or multiple values.
Does your API require you to send the same header on every request? Do you want to fine tune caching? Learn how how to add custom headers to your requests.
Learn how to annotate your service interface to execute form urlencoded requests using Retrofit.
Does your app allow photo or video upload? Learn how to upload files to a server using Retrofit.