Introduction
Retrofit is a widely used library in Android development for simplifying the process of making network requests. It’s developed by Square, a company known for creating developer-friendly tools.
Retrofit is a type-safe HTTP client for Android and Java, allowing developers to define an interface with abstract methods representing API endpoints. These methods are then invoked to execute HTTP requests, with Retrofit handling the boilerplate code for network operations such as serialization and deserialization of JSON data and threading.
In this lesson, you’ll learn:
- The purpose of the Retrofit library.
- The differences between Retrofit and HttpUrlConnection.
- How to incorporate Retrofit in an Android app.