Package org.apache.commons.httpclient

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

See:
          Description

Interface Summary
Credentials Authentication credentials.
HttpConnectionManager An interface for classes that manage HttpConnections.
HttpMethod HttpMethod interface represents a request to be sent via a HTTP connection and a corresponding response.
HttpUrlMethod Deprecated. use HttpMethod
MethodRetryHandler A handler for determining if an HttpMethod should be retried after a recoverable exception during execution.
ResponseConsumedWatcher When a response stream has been consumed, various parts of the HttpClient implementation need to respond appropriately.
 

Class Summary
Authenticator Deprecated. use HttpAuthenticator
AutoCloseInputStream Closes an underlying stream as soon as the end of the stream is reached, and notifies a client when it has done so.
ChunkedInputStream Transparently coalesces chunks of a HTTP stream that uses Transfer-Encoding chunked.
ChunkedOutputStream Wrapper supporting the chunked transfer encoding.
ConnectMethod Wraps another method to tunnel through a proxy.
ContentLengthInputStream Cuts the wrapped InputStream off after a specified number of bytes.
Cookie HTTP "magic-cookie" represents a piece of state information that the HTTP agent and the target server can exchange to maintain a session.
DefaultMethodRetryHandler The default MethodRetryHandler used by HttpMethodBase.
Header An HTTP header.
HeaderElement One element of an HTTP header's value.
HeaderGroup A class for combining a set of headers.
HostConfiguration Holds all of the variables needed to describe an HTTP connection to a host.
HttpClient An HTTP "user-agent", containing an HTTP state and one or more HTTP connections, to which HTTP methods can be applied.
HttpConnection An abstraction of an HTTP InputStream and OutputStream pair, together with the relevant attributes.
HttpConstants HTTP content conversion routines.
HttpMethodBase An abstract base implementation of HttpMethod.
HttpParser A utility class for parsing http header values.
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.
HttpsURL The HTTPS URL.
HttpURL The HTTP URL.
MultiThreadedHttpConnectionManager Manages a set of HttpConnections for various HostConfigurations.
NameValuePair A simple class encapsulating a name/value pair.
NTCredentials Credentials for use with the NTLM authentication scheme which requires additional information.
NTLM Deprecated. this class will be made package access for 2.0beta2
RequestOutputStream Deprecated. Use new ChunkedOutputStream(HttpConnecion#getRequestOutputStream());
ResponseInputStream Deprecated. Use new ChunkedInputStream(HttpConnecion#getResponseInputStream());
SimpleHttpConnectionManager A connection manager that provides access to a single HttpConnection.
StatusLine Represents a Status-Line as returned from a HTTP server.
URI The interface for the URI(Uniform Resource Identifiers) version of RFC 2396.
URI.LocaleToCharsetMap A mapping to determine the (somewhat arbitrarily) preferred charset for a given locale.
UsernamePasswordCredentials Username and password Credentials.
Wire Logs data to the wire LOG.
WireLogInputStream Logs all data read to the wire LOG.
WireLogOutputStream Logs all data written to the wire LOG.
 

Exception Summary
HttpConnection.ConnectionTimeoutException Signals that a timeout occured while opening the socket.
HttpException Signals that an HTTP or HttpClient exception has occurred.
HttpRecoverableException Signals that an HTTP or HttpClient exception has occurred.
URI.DefaultCharsetChanged The charset-changed normal operation to represent to be required to alert to user the fact the default charset is changed.
URIException The URI parsing and escape encoding exception.
 

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 © 2001-2004 Apache Software Foundation. All Rights Reserved.