OkHttp
Square’s meticulous HTTP client for the JVM, Android, and GraalVM. (by square)
Retrofit
A type-safe HTTP client for Android and the JVM (by square)
Our great sponsors
OkHttp | Retrofit | |
---|---|---|
37 | 41 | |
43,733 | 41,332 | |
0.3% | 0.4% | |
9.1 | 3.3 | |
3 days ago | 6 days ago | |
Kotlin | Java | |
Apache License 2.0 | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
OkHttp
Posts with mentions or reviews of OkHttp.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-03-06.
-
What stack to use for app with functionality like event calendar?
Retrofit in combination with OkHttp for fetching data from server (which hopefully already exists)
- Generate Kotlin client for a complex web API
-
Modern Android Development in 2023
OkHttp
-
Is it acceptable to use mock servers, like Postman, for testing in Android?
Being more familiar with Android development only, I mainly use https://github.com/square/okhttp/tree/master/mockwebserver
-
Best libraries for Android Developers
Retrofit is the best library that lets you connect to HTTP-based API services from your Android applications. It leverages the OkHttp library’s core functionality, adding a bunch of features to it while eliminating the boilerplate code.
-
How to use Cronet Engine for API calls? Any simple repo for it to understand?
Use Retrofit or anything else that builds on OkHttp. If you do end up needing some features that Cronet supports but OkHttp doesn't (such as HTTP/3), just write an interceptor or use google/cronet-transport-for-okhttp.
-
IPv6 Support on Android
Even as of 2022, there are networks out there that have broken/misconfigured IPv6, and there most likely always will be. Some wireless carriers and ISPs support it, but in some cases, people have old or improperly-configured routers and devices. Patchy IPv6 support is less of a problem on iOS and the web these days since those clients have support for dynamically falling back on IPv4 when IPv6 fails. After more research, we realized that Android didn’t have this “dual-stack” IP support, and neither did our preferred networking library, OkHttp. This explained why the content-loading issues only surfaced on Android, and why it took some additional digging to uncover the root cause.
Working with the reddit infrastructure team, we did more testing and built high confidence that this last IPv6 theory was indeed the cause of users’ content-loading problems. We assessed our usage of OkHttp and checked if there were any upcoming plans to improve support. OkHttp did have an open ask for “Happy Eyeballs” #506, but no known plans to implement it. Out of due diligence, we also assessed other network libraries– but knew that moving off OkHttp would be a radical change, indeed. We read the RFC 8305, “Happy Eyeballs algorithm for dual-stack IPv4/IPv6”, and thought “wow, we don’t want to implement this ourselves.” And as we were studying that open OkHttp issue and thinking “If only they would…”
-
App Flow of an Android App?
Your app would request data from the backend inside it's domain layer. As the other commenter mentioned, Retrofit is a commonly used library for interfacing with REST APIs, which is built on top of OkHttp (a more generic HTTP client).
-
Watery : A water delivery solution android app
OkHttp
Retrofit
Posts with mentions or reviews of Retrofit.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-03-06.
-
What stack to use for app with functionality like event calendar?
Retrofit in combination with OkHttp for fetching data from server (which hopefully already exists)
-
Moving from iOS development and I have a question about finding dependencies
So I've been playing around with search.maven.org and perhaps I'm not quite understanding it. For example, if I look for Retrofit I'm not seeing anything that resembles retrofit above https://central.sonatype.dev/search?q=Retrofit.
-
Ktor or Retrofit?
I'm going to hit you with a "it depends" though whether to use ktor or retrofit. If there is any part of you that thinks you're going to support multiplatform, then ktor with no discussion. Retrofit has come out and said that's not on their road map. There is another option called ktorfit which from the name you can guess is like retrofit but built on top of ktor to support multiplatform.
-
Building Your Domain Gateway With OpenAPI
Retrofit
-
Consuming a REST API using just vanilla Java!
I had a decent experience with Retrofit in the past, but that was a couple of years ago, idk if there are better tools now.
-
When should one use RxJava Observable and when simple Callback on Android?
I'm working on networking for my app. So I decided to try out Square's Retrofit. I see that they support simple Callback
-
App Flow of an Android App?
Your app would request data from the backend inside it's domain layer. As the other commenter mentioned, Retrofit is a commonly used library for interfacing with REST APIs, which is built on top of OkHttp (a more generic HTTP client).
- Top 10 Android Libraries to boost your development in 2022
-
What are the must-haves when developing an app?
Retrofit - networking
-
Converting AyncTask to RxJava
You'd be better off using Retrofit to request your data and Moshi to parse the JSON. Retrofit has built-in support for rx and coroutines.
What are some alternatives?
When comparing OkHttp and Retrofit you can also consider the following projects:
unirest-java - Unirest in Java: Simplified, lightweight HTTP client library.
Feign - Feign makes writing java http clients easier
Async Http Client - Asynchronous Http and WebSocket Client library for Java
Netty - Netty project - an event-driven asynchronous network application framework
Android Volley
android-async-http - This project under develop
Jersey - Eclipse Jersey Project - Read our Wiki:
RESTEasy - An Implementation of the Jakarta RESTful Web Services Specification
gRPC - The Java gRPC implementation. HTTP/2 based RPC