retrofit (lysine-dev/retrofit)
Searching Database…
What is this?
Retrofit is a type-safe HTTP client for Android and the JVM, created by Square. It lets you define your REST API as a Java/Kotlin interface and turns HTTP calls into simple method calls.
Is it a framework or just a library?
It's a library you add as a dependency, not a standalone app or framework; it generates an implementation of an interface you write to describe your API calls.
How do I add it to a project?
Add the Maven Central coordinates com.squareup.retrofit2:retrofit:3.0.0 to your build (Gradle/Maven), or download the latest JAR directly.
What Java or Android version do I need?
You need at least Java 8+ for JVM projects or Android API 21+ for Android apps.
Any gotchas when using R8 or ProGuard?
R8 users get the shrinking/obfuscation rules automatically, but ProGuard users must manually add rules from retrofit2.pro, plus the OkHttp ProGuard rules since OkHttp is a dependency.
Does Retrofit depend on OkHttp?
Yes, OkHttp is a dependency, which is why ProGuard users also need to add OkHttp's ProGuard rules alongside Retrofit's own.
Can I get snapshot builds of Retrofit?
Yes, development snapshots are published to Sonatype's snapshots repository for those who want unreleased changes.
What are similar projects?
android-async-http, guzzle, okhttp-OkGo, okhttp, dio, Alamofire, ollama-python, mimic
Which topics is it in?
http-client, json, sdk, rest-api, java, networking, android, api, library, cross-platform, developer-tools, mit