Apache HttpComponents logo

Apache HttpComponents

Apache HttpComponents is a set of Java HTTP components, including a feature-rich HTTP client (HttpClient 5.x) and HTTP server components. It provides connection pooling, async I/O, TLS/SSL support, authentication, cookie management, and content negotiation for Java applications making HTTP requests.

2 APIs 1 Capabilities 8 Features
ApacheHTTP ClientJavaOpen SourceSDK

APIs

Apache HttpComponents Client API

Java HTTP client library API for executing HTTP requests with connection pooling, async I/O, TLS/SSL, authentication, cookie management, and proxy support via Apache HttpCompone...

Apache HttpComponents Java SDK

Maven artifact for Apache HttpComponents HttpClient 5.x providing full HTTP client functionality including fluent API, async client, and reactive streams support.

Capabilities

Features

Connection Pooling

Configurable connection pool with per-route and total connection limits for efficient HTTP connection reuse.

Async HTTP Client

Non-blocking async HTTP client based on Java NIO for high-concurrency request execution.

TLS/SSL Support

Full TLS/SSL support with customizable trust stores, client certificates, and hostname verification.

Authentication Framework

Pluggable authentication framework supporting Basic, Digest, NTLM, and Bearer token schemes.

Cookie Management

RFC-compliant cookie management with customizable cookie stores and policies.

Proxy Support

HTTP, HTTPS, and SOCKS proxy support with proxy authentication.

Content Negotiation

Built-in content encoding, compression (gzip/deflate), and charset negotiation.

Fluent API

High-level fluent API for simplified one-liner HTTP request execution.

Use Cases

REST API Client Integration

Consume REST APIs from Java applications with connection pooling and retry logic.

Web Scraping

Crawl and fetch web content with cookie handling and redirect following.

Microservices HTTP Communication

Make service-to-service HTTP calls with connection reuse and timeout configuration.

Authentication Token Refresh

Implement OAuth2 token refresh flows using the authentication interceptor framework.

File Upload and Download

Stream large file uploads and downloads via multipart or chunked transfer encoding.

Integrations

Spring Framework

Spring RestTemplate and WebClient use Apache HttpComponents as a configurable HTTP backend.

Apache CXF

Apache CXF JAX-RS client uses HttpComponents for HTTP transport in web service calls.

Elasticsearch Java Client

Elasticsearch Java client uses HttpComponents for transport-layer HTTP communication.

Apache Solr

Apache Solr Java client (SolrJ) uses HttpComponents for Solr HTTP API calls.

Semantic Vocabularies

Apache Http Client Context

17 classes · 0 properties

JSON-LD

API Governance Rules

Apache HttpComponents API Rules

7 rules · 2 errors 4 warnings 1 info

SPECTRAL

Resources

🔗
Documentation
Documentation
🚀
GettingStarted
GettingStarted
👥
GitHubOrganization
GitHubOrganization
👥
GitHubRepository
GitHubRepository
🔗
SpectralRules
SpectralRules
🔗
Vocabulary
Vocabulary
🔗
NaftikoCapability
NaftikoCapability