// the find
square/okhttp
Square’s meticulous HTTP client for the JVM, Android, and GraalVM.
OkHttp is Square's HTTP client for JVM and Android, now at version 5.x with Kotlin Multiplatform support and GraalVM native image compatibility. It handles the low-level plumbing most apps need — connection pooling, HTTP/2, transparent GZIP, response caching, and automatic retry on transient failures. If you're writing a JVM or Android app that makes HTTP calls, you're probably already using this.
The interceptor chain is genuinely well-designed — you can add logging, auth, retry logic, or request transformation in a composable way without touching call sites. MockWebServer ships with the library and makes HTTP integration testing straightforward without standing up a real server. The TLS handling is serious: certificate pinning, Conscrypt support, and a public history of how they've tracked the TLS ecosystem over time. Java 9 module support in 5.2+ means the internal package boundary is now enforced at compile time rather than relying on developer discipline.
The Kotlin Multiplatform migration in v5 is still rough for Maven users — the `okhttp` artifact is intentionally empty and you must depend on `okhttp-jvm` or `okhttp-android` explicitly, which breaks naive dependency declarations and trips up anyone upgrading without reading the release notes. MockWebServer is explicitly under-maintained; the docs tell you to go use MockServer instead, which is an odd thing to ship in the same repo. The cache implementation is not pluggable by design — if you need custom cache storage (encrypted disk, in-memory with different eviction policy), you're out of luck. Coroutine support is in a separate add-on module rather than first-class, so `await()` calls require an extra dependency that most teams don't discover until they've already written callback-based code.