Apache HttpComponents website screenshot

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 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.

Collections

Pricing Plans

Rate Limits

Apache Http Rate Limits

5 limits

RATE LIMITS

FinOps

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

JSON Structure

Http Client Connectionconfig Structure

5 properties

JSON STRUCTURE

Http Client Httprequest Structure

5 properties

JSON STRUCTURE

Http Client Httpresponse Structure

5 properties

JSON STRUCTURE

Http Client Proxyconfig Structure

5 properties

JSON STRUCTURE

Example Payloads

Resources

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

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: Apache HttpComponents Client API
  version: 5.3.0
items:
- info:
    name: Requests
    type: folder
  items:
  - info:
      name: Apache HttpComponents Execute Request
      type: http
    http:
      method: POST
      url: https://api.example.com/execute
      body:
        type: json
        data: '{}'
    docs: Execute an HTTP request using the Apache HttpComponents client with the provided request configuration.
- info:
    name: Configuration
    type: folder
  items:
  - info:
      name: Apache HttpComponents Configure Connection
      type: http
    http:
      method: PUT
      url: https://api.example.com/configure/connection
      body:
        type: json
        data: '{}'
    docs: Update connection pool and timeout configuration for the HTTP client.
  - info:
      name: Apache HttpComponents Configure Proxy
      type: http
    http:
      method: PUT
      url: https://api.example.com/configure/proxy
      body:
        type: json
        data: '{}'
    docs: Configure an HTTP proxy for outbound requests from the HttpComponents client.
bundled: true