For a java library for making http requests, the strongest matches are openfeign/feign (Feign is a declarative Java HTTP client framework that), square/okhttp (OkHttp is a comprehensive and industry-standard HTTP client for) and square/retrofit (Retrofit is a robust, type-safe HTTP client for Java). asynchttpclient/async-http-client and rest-assured/rest-assured round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
We curate open-source GitHub repositories matching “best java http client libraries”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
Feign is a declarative Java HTTP client framework that maps method signatures to REST API requests. It functions as an HTTP interface mapper, allowing the creation of type-safe clients by defining service interfaces with annotations to eliminate manual request logic. The framework features a pluggable HTTP transport layer, which decouples request definition from execution by routing network traffic through interchangeable underlying HTTP engines. It provides a comprehensive request management pipeline including interceptors for modifying headers, policy-driven retry logic for failure recover
Feign is a declarative Java HTTP client framework that provides a fluent, interface-based approach to API interactions, supporting asynchronous execution, interceptors, and pluggable transport engines for robust request handling.
OkHttp is an HTTP client for the JVM and Android that enables network communication via synchronous and asynchronous requests. It provides a core identity as a comprehensive networking toolkit featuring a WebSocket client for bidirectional data synchronization, a TLS security toolkit for encrypted communication, and a programmable HTTP mock server for simulating backend responses. The project distinguishes itself through a specialized security and performance architecture. It implements mutual TLS, certificate pinning, and DNS over HTTPS to secure data in transit, while utilizing connection p
OkHttp is a comprehensive and industry-standard HTTP client for the JVM that natively supports asynchronous requests, HTTP/2, connection pooling, and interceptors, making it a flagship choice for robust API interactions.
Retrofit is a type-safe HTTP client that simplifies network communication by allowing developers to define API endpoints as interface methods. By using annotation-driven request mapping, it automatically translates these interface definitions into structured HTTP requests, ensuring consistent data structures and reducing manual configuration when interacting with remote web services. The project distinguishes itself through a highly modular architecture that separates network transport from data handling. It utilizes dynamic proxy generation to process method calls at runtime and offers a plu
Retrofit is a robust, type-safe HTTP client for Java that provides a fluent interface for API interactions, featuring built-in support for asynchronous requests, connection pooling, and seamless integration with various JSON serialization libraries.
This is a non-blocking network client for Java applications that provides asynchronous HTTP request capabilities and bidirectional WebSocket connectivity. It leverages a Netty-based architecture to handle high volumes of network input and output. The library utilizes native transport abstractions such as Epoll, KQueue, and io_uring to reduce system latency. It supports HTTP/2 multiplexing to run multiple concurrent request-response streams over a single connection and provides automatic response body decompression for various formats. Core capabilities cover the management of complex network
This library is a robust, non-blocking Java HTTP client that provides asynchronous request handling, HTTP/2 support, and interceptor-based middleware, making it a strong fit for high-performance API interactions.
Rest-assured is a Java-based REST API testing framework and HTTP client library designed for automating web service tests. It provides a fluent domain-specific language and assertion library to send HTTP requests and validate response metadata, including status codes, headers, cookies, and bodies. The framework is distinguished by a method-chaining DSL that creates readable specifications for API interactions. It features a filter-based request interception pipeline, object-mapping serialization for converting Java objects to JSON or XML, and a path-based parsing system to isolate specific fi
Rest-assured is a Java library that provides a fluent DSL for making HTTP requests and handling API interactions, though it is primarily optimized for testing and validation rather than general-purpose production client use.
Ion is an asynchronous HTTP client library for Android that handles network requests, JSON parsing, image loading, and file downloads. It provides a fluent builder pattern for constructing requests and supports automatic JSON deserialization into Java objects using Gson, along with in-memory image caching and multipart form-data encoding. The library distinguishes itself through its support for request cancellation via Future objects, allowing individual or bulk cancellation of in-flight requests to avoid wasted bandwidth and stale callbacks. It also includes proxy-aware request routing for d
Ion is an asynchronous Java HTTP client library that provides a fluent builder API, built-in JSON deserialization, and request cancellation, making it a capable tool for handling API interactions on Android.
Google HTTP Client Library for Java
This library provides a flexible and extensible foundation for making HTTP requests in Java, though it requires additional modules for features like JSON serialization and specific HTTP/2 implementations.
This is an asynchronous HTTP client for Android that simplifies network requests by wrapping Apache HttpClient. It provides a callback-based networking library for fetching remote data and communicating with servers without blocking the user interface. The project includes a multipart HTTP uploader for sending binary files and large data payloads, as well as a JSON parser to convert raw response text into structured data objects. It features a session manager that persists cookies in local application preferences to maintain state across multiple requests. Additional capabilities include aut
This library is specifically designed for Android development and relies on an older, deprecated Apache HttpClient wrapper, making it unsuitable as a modern, robust Java HTTP client for general-purpose API interactions.
nghttp2 is a suite of low-level C libraries and tools designed for implementing the HTTP/2 protocol. It provides a memory-efficient implementation of the protocol's core logic, including framing, stream multiplexing, and flow control. The project includes a dedicated library for HPACK header compression and decompression to reduce network bandwidth. It also provides a toolset for analyzing network traffic and benchmarking server performance, including throughput and latency measurements. Its broader capabilities cover protocol implementation and traffic management, including ALPN connection
This is a low-level C implementation of the HTTP/2 protocol rather than a Java HTTP client library, making it a building block for protocol support rather than a tool for making API requests in Java.
Armeria is a Netty-based microservice framework used for building high-performance asynchronous services. It functions as a multi-protocol RPC server capable of exposing gRPC, Thrift, and REST services on a single unified port. The project is distinguished by its ability to run diverse communication protocols simultaneously and its integrated RPC debugging web console, which allows for the discovery and invocation of remote procedure calls via JSON. It also includes a gRPC to JSON transcoder to enable web client compatibility with Protobuf services. The framework provides a comprehensive sui
Armeria is a high-performance microservices framework designed for building servers rather than a standalone HTTP client library, though it does include a powerful client-side component that supports asynchronous requests, HTTP/2, and decorators.
This project is a terminal-based HTTP client designed for interacting with web services, debugging APIs, and automating network requests. It provides a specialized command-line interface that simplifies the construction of complex HTTP exchanges, allowing users to test and inspect web services directly from the shell. The tool distinguishes itself through a declarative syntax engine that translates shorthand command-line tokens into fully formed HTTP requests, including headers, parameters, and body payloads. It features a modular, plugin-based architecture that enables users to extend core f
This is a command-line application for interacting with APIs rather than a Java library that you can integrate into your own code for handling HTTP requests.
This project provides a comprehensive implementation of the WebSocket protocol, enabling persistent, bidirectional communication between clients and servers. It handles the low-level complexities of the protocol, including the initial HTTP upgrade handshake and the encapsulation of data into discrete binary frames. By managing these connections, it allows applications to exchange data instantly without the overhead associated with repeated standard request cycles. The library distinguishes itself through its focus on high-frequency message exchange and concurrent connection management. It uti
This library is a specialized tool for managing persistent WebSocket connections in Go, which is a different category than a Java-based HTTP client library for standard RESTful API interactions.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| openfeign/feign | 9.8K | Java | Apache-2.0 | |
| square/okhttp | 47K | Kotlin | Apache-2.0 | |
| square/retrofit | 43.9K | HTML | Apache-2.0 | |
| asynchttpclient/async-http-client | 6.4K | Java | NOASSERTION | |
| rest-assured/rest-assured | 7.1K | Java | Apache-2.0 | |
| koush/ion | 6.3K | Java | other | |
| googleapis/google-http-java-client | 1.4K | Java | Apache-2.0 | |
| loopj/android-async-http | 10.6K | Java | Apache-2.0 | |
| nghttp2/nghttp2 | 5K | C++ | NOASSERTION | |
| line/armeria | 5.1K | Java | Apache-2.0 |