OkHttp VS unirest-java

Compare OkHttp vs unirest-java and see what are their differences.


Square’s meticulous HTTP client for the JVM, Android, and GraalVM. (by square)


Unirest in Java: Simplified, lightweight HTTP client library. (by Kong)
Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • InfluxDB - Access the most powerful time series database as a service
  • SonarQube - Static code analysis for 29 languages.
OkHttp unirest-java
37 3
43,733 2,421
0.3% 0.8%
9.1 4.7
4 days ago about 1 month ago
Kotlin Java
Apache License 2.0 MIT License
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.


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?
    2 projects | reddit.com/r/androiddev | 6 Mar 2023
    Retrofit in combination with OkHttp for fetching data from server (which hopefully already exists)
  • Generate Kotlin client for a complex web API
    7 projects | dev.to | 9 Feb 2023
  • Modern Android Development in 2023
    7 projects | dev.to | 23 Jan 2023
  • Is it acceptable to use mock servers, like Postman, for testing in Android?
    3 projects | reddit.com/r/androiddev | 6 Sep 2022
    Being more familiar with Android development only, I mainly use https://github.com/square/okhttp/tree/master/mockwebserver
  • Best libraries for Android Developers
    19 projects | dev.to | 15 Jul 2022
    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?
    2 projects | reddit.com/r/androiddev | 30 Jun 2022
    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
    2 projects | reddit.com/r/RedditEng | 31 May 2022
    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.
    2 projects | reddit.com/r/RedditEng | 31 May 2022
    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?
    2 projects | reddit.com/r/androiddev | 23 May 2022
    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
    3 projects | dev.to | 1 May 2022


Posts with mentions or reviews of unirest-java. We have used some of these posts to build our list of alternatives and similar projects.

We haven't tracked posts mentioning unirest-java yet.
Tracking mentions began in Dec 2020.

What are some alternatives?

When comparing OkHttp and unirest-java you can also consider the following projects:

Async Http Client - Asynchronous Http and WebSocket Client library for Java

Netty - Netty project - an event-driven asynchronous network application framework

Retrofit - A type-safe HTTP client for Android and the JVM

Android Volley

gRPC - The Java gRPC implementation. HTTP/2 based RPC

android-async-http - This project under develop

Finagle - A fault tolerant, protocol-agnostic RPC system

http-request - Java HTTP Request Library

Armeria - Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.

okio - A modern I/O library for Android, Java, and Kotlin Multiplatform.

Dubbo - Apache Dubbo is a high-performance, java based, open source RPC framework.