Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Android
  3. okhttp

okhttp

Apache-2.0Kotlin

An efficient HTTP client for JVM, Android, and GraalVM with HTTP/2, connection pooling, caching, and modern TLS support.

Visit WebsiteGitHubGitHub
47.1k stars9.3k forks0 contributors

What is okhttp?

OkHttp is an HTTP client library for the JVM, Android, and GraalVM, designed to make network communication efficient and reliable. It solves the problem of slow and unstable HTTP requests by providing built-in performance optimizations like HTTP/2 support, connection pooling, and response caching. It also handles network issues gracefully with automatic recovery and supports modern security standards like TLS 1.3.

Target Audience

Java and Kotlin developers building Android, server-side, or desktop applications that require robust HTTP networking. It's particularly valuable for teams needing a production-ready client with strong performance and standards compliance.

Value Proposition

Developers choose OkHttp because it's efficient by default, follows modern HTTP specifications closely, and is backed by Square's meticulous engineering. Its combination of performance features, network resilience, and a clean, fluent API makes it a reliable choice over lower-level HTTP libraries.

Overview

A meticulous HTTP client for the JVM, Android, and GraalVM.

Use Cases

Best For

  • Building Android apps that make frequent API calls
  • Developing microservices in Java/Kotlin that communicate over HTTP
  • Creating CLI tools in JVM languages that fetch web resources
  • Testing HTTP clients with the included MockWebServer library
  • Optimizing network performance with HTTP/2 and connection reuse
  • Ensuring secure communications with modern TLS features

Not Ideal For

  • Projects that need to send GET requests with a body for legacy API compatibility
  • Teams requiring extensive HTTP client customization to work around buggy or non-compliant servers
  • Systems where a pluggable cache implementation is necessary for specialized caching strategies
  • Developers looking for a full-featured, standalone HTTP mocking library for complex test scenarios

Pros & Cons

Pros

Optimized Performance Out of the Box

Includes HTTP/2 support for socket sharing, connection pooling, and transparent GZIP compression to reduce latency and bandwidth, as highlighted in the README's efficiency features.

Resilient Network Communication

Silently recovers from common connection issues and attempts alternate IP addresses, ensuring reliability in unstable networks, which is explicitly mentioned for handling troublesome networks.

Modern Security and Standards

Supports TLS 1.3 and follows recent HTTP RFCs like RFC 9110, providing secure and spec-compliant interactions without compromising on correctness.

Developer-Friendly API

Offers a fluent builder pattern with immutable objects, supporting both synchronous and asynchronous calls easily, as shown in the example code snippets.

Cons

Rigid Standards Compliance

Does not allow non-standard behaviors like GET with a body, which can be problematic for older or non-compliant APIs, as admitted in the example limitations.

Inflexible Cache System

The response cache is not designed as an interface, preventing the use of custom caching implementations, limiting extensibility for advanced use cases.

Complex Maven Integration

Maven projects must manually select between okhttp-jvm and okhttp-android artifacts, adding configuration overhead compared to Gradle's automatic handling.

Frequently Asked Questions

Quick Stats

Stars47,062
Forks9,294
Contributors0
Open Issues96
Last commit6 hours ago
CreatedSince 2012

Tags

#caching#connection-pooling#android#tls#java#jvm#graalvm#http2#kotlin#http-client#networking

Built With

K
Kotlin
O
Okio
G
GraalVM

Links & Resources

Website

Included in

Android12.0kJVM2.2k
Auto-fetched 4 hours ago

Related Projects

gorgor

GoReplay is an open-source tool for capturing and replaying live HTTP traffic into a test environment in order to continuously test your system with real data. It can be used to increase confidence in code deployments, configuration changes and infrastructure changes.

Stars19,319
Forks96
Last commit7 months ago
comcastcomcast

Simulating shitty network connections so you can build better systems.

Stars10,513
Forks378
Last commit1 year ago
AeronAeron

Efficient reliable UDP unicast, UDP multicast, and IPC message transport

Stars8,846
Forks1,089
Last commit17 hours ago
SimianArmySimianArmy

Tools for keeping your cloud operating in top form. Chaos Monkey is a resiliency tool that helps applications tolerate random instance failures.

Stars7,980
Forks1,114
Last commit7 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub