Package org.apache.commons.httpclient

Classes and interfaces supporting the client side of the HTTP protocol.

See:
          Description

Interface Summary
Credentials Authentication credentials.
HttpMethod A request to be applied to an HttpConnection, and a container for the associated response.
HttpUrlMethod HttpUrlMethod extends HttpMethod.
 

Class Summary
Base64 Base64 encoder and decoder.
ChunkedInputStream Transparently coalesces chunks of a HTTP stream that uses Transfer-Encoding chunked.
ConnectMethod Wraps another method to tunnel through a proxy.
ContentLengthInputStream Cuts the wrapped InputStream off after a specified number of bytes.
Cookie An HTTP "magic-cookie", as specified in RFC 2109.
Header An HTTP header.
HeaderElement One element of an HTTP header's value.
HttpClient An HTTP "user-agent", containing an HttpState and one or more HttpConnections, to which HttpMethods can be applied.
HttpConnection An abstraction of an HTTP InputStream and OutputStream pair, together with the relevant attributes.
HttpConnectionManager Manages a set of HttpConnections for various host:ports.
HttpMethodBase An abstract base implementation of HttpMethod.
HttpMultiClient An Http user-agent that supports multiple connections to Http servers.
HttpSharedState HttpSharedState provides synchronized access to HttpState so that the state can be used in calls to HttpMultiClient.executeMethod() on multiple threads.
HttpState A container for HTTP attributes that may persist from request to request, such as Cookies and authentication Credentials.
HttpStatus Constants enumerating the HTTP status codes.
NameValuePair A simple class encapsulating a name/value pair.
RequestOutputStream OutputStream wrapper supporting the chunked transfer encoding.
ResponseInputStream InputStream wrapper supporting the chunked transfer encoding.
URIUtil General purpose methods for encoding URI's, as described in RFC 2396.
UsernamePasswordCredentials Username and password Credentials.
WireLogInputStream Logs all data read to the wire log.
 

Exception Summary
HttpException Signals that an HTTP or HttpClient exception has occurred.
HttpRecoverableException Signals that an HTTP or HttpClient exception has occurred.
 

Package org.apache.commons.httpclient Description

Classes and interfaces supporting the client side of the HTTP protocol.

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 can be easily created or supported.

The basis for the abstraction is provided by three types:

and several simple bean-style classes:

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:

HttpClient Configuration with Java Properties

Java properties can be set at run time with the -Dname=value command line arguments to the application that uses HttpClient. These properties can also be set programaticly by calling System.getProperties().setProperty(name, value). This is the list of properties that HttpClient recognizes:
Name Type Effect
httpclient.useragent String Sets the User-Agent string to be sent on every HTTP request.
httpclient.authentication.preemptive boolean Sends authorization credentials without requiring explicit requests from the web server



Copyright (c) 2001 - Apache Software Foundation