OSS Tanbou

build Java HTTP/1.1 and HTTP/2 clients with connection management, authentication, cookies, and caching

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
1,535
Primary language
Java
License
Apache-2.0
Repository last updated
Oct 2, 2026
On this page

Overview

Apache HttpClient is a Java client library for HTTP communication. Classic and asynchronous APIs, connection management, authentication, cookies, caching, and related protocol features provide a configurable transport layer for applications using HTTP/1.1 and HTTP/2.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Choose classic or asynchronous client APIs

Synchronous code can use the classic CloseableHttpClient API, while applications with higher concurrency requirements can use asynchronous transports. Both approaches share the HttpComponents configuration model for client behavior.

Sources: [1][2]

Manage connections, authentication, cookies, and related client state

Beyond sending requests, HttpClient supports connection reuse, authentication, cookies, redirects, compression, caching, and other behavior required by long-running HTTP clients.

Sources: [2][1]

Build around HTTP/1.1 and HTTP/2 protocol requirements

The README documents conformance targets for HTTP semantics, caching, HTTP/1.1, HTTP/2, authentication, cookies, and other RFCs. The 5.x client works with HttpCore 5 modules to provide HTTP/1.1 and HTTP/2 support.

Sources: [1][4]

Best fit

Fits Java services that need fine-grained control over outbound HTTP

It is relevant for services that reuse many outbound connections, maintain authentication or cookie state, or need detailed control over proxy, TLS, asynchronous transport, and related client behavior.

Sources: [2][1]

Before adoption

Version 5.6.4 requires Java 8 or newer

HttpClient 5.6.4 targets Java 8 or newer and is published as org.apache.httpcomponents.client5:httpclient5:5.6.4. Verify the application's JDK and resolved dependency set.

Sources: [2][3]

Moving from 4.x to 5.x changes packages and configuration APIs

The 5.x line uses org.apache.hc.client5 packages and new Maven coordinates. Treat upgrades from 4.5.x as a migration that requires API and configuration review rather than a version-only substitution.

Sources: [2][3]

Version 5.6.4 is coupled to the HttpCore 5.4.3 line

The 5.6.4 main module depends on HttpCore 5.4.3 and its HTTP/2 module. If dependency management overrides only part of that stack, check compatibility and release notes before deployment.

Sources: [4][5]

Official sources

  1. [1]Apache HttpClient README(2026-10-03)
  2. [2]Apache HttpClient Quick Start(2026-10-03)
  3. [3]Apache HttpClient Maven coordinates(2026-10-03)
  4. [4]Apache HttpClient 5.6.4 dependencies(2026-10-03)
  5. [5]Apache HttpComponents project news(2026-10-03)
  6. [6]Apache HttpClient Apache-2.0 license(2026-10-03)
Supplemental curator note

For simple HTTP calls, the JDK's built-in client may already be sufficient. HttpClient becomes easier to justify when an application needs coordinated control over connection pools, authentication, cookies, caching, asynchronous transport, and related protocol behavior.

Try it in 3 steps

  1. 1

    Add HttpClient 5.6.4 as a dependency

    Add the dependency to an existing Maven project's pom.xml. Java 8 or newer is required.

    <dependency><groupId>org.apache.httpcomponents.client5</groupId><artifactId>httpclient5</artifactId><version>5.6.4</version></dependency>
  2. 2

    Create a client that performs a GET request

    Follow the classic API pattern from the official Quick Start, close the client, and inspect the response status. Import the required org.apache.hc.client5.http.* classes.

    try (CloseableHttpClient httpclient = HttpClients.createDefault()) { ClassicHttpRequest request = ClassicRequestBuilder.get("https://httpbin.org/get").build(); httpclient.execute(request, response -> { System.out.println(response.getCode()); return null; }); }
  3. 3

    Build and verify the application

    Run the existing project's tests or equivalent execution path and verify connection, TLS, proxy, and other environment-specific settings.

    mvn test
Check the official README

Growth

Growth trends · Last 30 days

1,535 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
16
Open PRs
10

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • httpcomponents
Stars
1,535
Forks
991
Watchers
100
Open issues
0
Contributors
112
Owner type
Organization
Primary language
Java
License
Apache-2.0
Repository last updated
Oct 2, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?