HttpClient Overview

The Hyper-Text Transfer Protocol (HTTP) is perhaps the most significant protocol used on the Internet today. Web services, network-enabled appliances and the growth of network computing continue to expand the role of the HTTP protocol beyond user-driven web browsers, while increasing the number of applications that require HTTP support.

Although the java.net package provides basic functionality for accessing resources via HTTP, it doesn't provide the full flexibility or functionality needed by many applications. HttpClient seeks to fill this void by providing an efficient, up-to-date, and feature-rich package implementing the client side of the most recent HTTP standards and recommendations.

Designed for extension while providing robust support for the base HTTP protocol, HttpClient may be of interest to anyone building HTTP-aware client applications such as web browsers, web service clients, or systems that leverage or extend the HTTP protocol for distributed communication.

Documentation

  1. Quick Start - contains simple, complete examples of request execution with the classic, fluent and async APIs.

  2. Examples demonstrating some common as well as more complex use cases

  3. Javadocs

  4. API compatibility reports

Features

  • Standards based, pure Java, implementation of HTTP versions 1.0, 1.1, 2.0
  • Supports encryption with HTTPS (HTTP over SSL) protocol.
  • Pluggable socket factories and TLS strategies.
  • Transparent message exchanges through HTTP/1.1 and HTTP/1.0 proxies.
  • Tunneled HTTPS connections through HTTP/1.1 and HTTP/1.0 proxies, via the CONNECT method.
  • Basic, Digest, NTLMv1, NTLMv2, NTLM2 Session, SNPNEGO, Kerberos authentication schemes.
  • HTTP state management and cookie support.
  • Flexible connection management and pooling.
  • Support for HTTP response caching.
  • Source code is freely available under the Apache License.

Standards Compliance

HttpClient strives to conform to the following specifications endorsed by the Internet Engineering Task Force (IETF) and the internet at large:

  • RFC 7230 - Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing
  • RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
  • RFC 7235 - Hypertext Transfer Protocol (HTTP/1.1): Authentication
  • RFC 1945 - Hypertext Transfer Protocol -- HTTP/1.0
  • RFC 2817 - Upgrading to TLS Within HTTP/1.1
  • RFC 2818 - HTTP Over TLS
  • RFC 6265 - HTTP State Management Mechanism (Cookies)
  • RFC 2396 - Uniform Resource Identifiers (URI): Generic Syntax