HttpClient - Overview
Author: HttpComponents Team

##### Overview

- Features
- News
- Status
- Download
- Wiki
- User Guide
  - Authentication Guide
  - Character Encodings
  - Cookies
  - Exception Handling
  - Logging Guide
  - Methods
  - Optimization Guide
  - Preference Architecture
  - Redirects Handling
  - Sample Code
  - SSL Guide
  - Threading
  - Trouble Shooting
  - Tutorial
- Developer Guide

##### Project Documentation

- About
- Project Info
- Project Reports
- Development Process

##### Legend

- External Link
- Opens in a new window

## Scope

The HttpClient component supports the client-side of RFC 1945 (HTTP/1.0) and RFC 2616 (HTTP/1.1), several related specifications (RFC 2109 (Cookies), RFC 2617 (HTTP Authentication), etc.), and provides a framework by which new request types (methods) or HTTP extensions can be created easily.

## The org.apache.commons.httpclient Package

The basis for the abstraction is provided by three primary types:

HttpConnection
  represents a network connection to some HTTP host.
HttpMethod
  represents a request to be made over some `HttpConnection` and contains the server's response.
HttpState
  contains the HTTP attributes that may persist from request to request, such as cookies and authentication credentials.

and several simple bean-style classes:

Cookie
  represents HTTP cookie.
Credentials
  an interface representing a set of authentication credentials.
Header
  represents an HTTP request or response header.
HeaderElement
  represents a single element of a multi-part header.
UsernamePasswordCredentials
  a username and password pair.

HttpClient provides a simple "user-agent" implementation that will suffice for many applications, but whose use is not required.

HttpClient also provides several utilities that may be useful when extending the framework:

HttpMethodBase
  an abstract base implementation of `HttpMethod`, which may be extended to create new method types or to support additional HTTP protocol features.
HttpStatus
  an enumeration of HttpStatus codes.
RequestOutputStream
  an `OutputStream` wrapper supporting the "chunked" transfer encoding.
ResponseInputStream
  an `InputStream` wrapper supporting the "chunked" transfer encoding.
URIUtil
  provides utilities for encoding and decoding URI's in the `%HH` format.

## The org.apache.commons.httpclient.methods Package

The org.apache.commons.httpclient.methods package provides `HttpMethod` implementations of the most commonly used HTTP methods, including GET, POST, PUT, OPTIONS, HEAD and DELETE.