An idiomatic Clojure HTTP client wrapping JDK 11's HttpClient, supporting HTTP/1.1, HTTP/2, and WebSockets.
hato is an HTTP client library for Clojure that wraps JDK 11's built-in HttpClient. It provides an idiomatic Clojure API for making HTTP requests, supporting both synchronous and asynchronous operations, HTTP/1.1 and HTTP/2 protocols, and WebSocket connections. It solves the need for a modern, feature-rich HTTP client in Clojure that leverages the standard Java library.
Clojure developers building applications that need to make HTTP requests to external APIs or services, especially those requiring HTTP/2, async handling, or WebSocket support.
Developers choose hato for its clean Clojure API, seamless integration with JDK 11's HttpClient, and comprehensive feature set including async support, WebSockets, and response coercion—all without external dependencies beyond optional JSON/Transit libraries.
An HTTP client for Clojure, wrapping JDK 11's HttpClient
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically upgrades to HTTP/2 where possible with fallback to HTTP/1.1, leveraging JDK 11's built-in HttpClient for performance and compliance.
Provides asynchronous request handling via CompletableFuture with callback support and includes a built-in WebSocket client for real-time communication, as shown in the async and websocket sections.
Wraps JDK HttpClient in a Clojure-friendly interface with convenient options for query params, form data, and response coercion, while still exposing Java objects for advanced configuration.
Supports a pluggable middleware stack for custom request/response processing, allowing developers to intercept and modify behavior, as demonstrated in the custom middleware examples.
Ties the library to JDK 11 or higher, excluding projects on older Java versions and forcing upgrades in legacy systems, as stated in the installation notes.
JSON and Transit response coercion require external libraries like cheshire and transit-clj, adding setup complexity and potential dependency conflicts for these features.
Lacks native support for common resilience patterns like automatic retries or circuit breaking, requiring custom middleware or external tools for robust error handling.