Package edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient
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:
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 protocol HTTP features.
HttpStatus
- an enumeration of HttpStatus codes.
ChunkedOutputStream
-
an
OutputStream
wrapper supporting the "chunked" transfer encoding. ChunkedInputStream
-
an
InputStream
wrapper supporting the "chunked" transfer encoding. URIUtil
- provides utilities for encoding and decoding URI's in the %HH format.
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
-
ClassDescriptionTransparently coalesces chunks of a HTTP stream that uses Transfer-Encoding chunked.Implements HTTP chunking support.Signals a circular redirectA timeout while connecting waiting for an available connection from an HttpConnectionManager.Establishes a tunneled HTTP connection via the CONNECT method.A timeout while connecting to an HTTP server or waiting for an available connection from an HttpConnectionManager.Cuts the wrapped InputStream off after a specified number of bytes.HTTP "magic-cookie" represents a piece of state information that the HTTP agent and the target server can exchange to maintain a session.Authentication credentials.The default
HttpMethodRetryHandler
used byHttpMethod
s.Deprecated.An HTTP header.One element of an HTTP header's value.A class for combining a set of headers.Holds all of the variables needed to describe an HTTP connection to a host.An HTTP "user-agent", containing anHTTP state
and one or moreHTTP connections
, to whichHTTP methods
can be applied.Signals that an error has occurred.An abstraction of an HTTPInputStream
andOutputStream
pair, together with the relevant attributes.An interface for classes that manage HttpConnections.Deprecated.use EncodingUtil classSignals that the response content was larger than anticipated.Signals that an HTTP or HttpClient exception has occurred.Holds all of the variables needed to describe an HTTP connection to a host.HttpMethod interface represents a request to be sent via aHTTP connection
and a corresponding response.An abstract base implementation of HttpMethod.A handler for determining if an HttpMethod should be retried after a recoverable exception during execution.A utility class for parsing http header values according to RFC-2616 Section 4 and 19.3.Deprecated.no longer usedA container for HTTP attributes that may persist from request to request, such ascookies
and authenticationcredentials
.Constants enumerating the HTTP status codes.The HTTPS URL.The HTTP URL.HTTP version, as specified in RFC 2616.Signals violation of HTTP specification caused by an invalid redirect locationDeprecated.Manages a set of HttpConnections for various HostConfigurations.A simple class encapsulating a name/value pair.Signals that the target server failed to respond with a valid HTTP response.Credentials
for use with the NTLM authentication scheme which requires additional information.Signals that an HTTP protocol violation has occurred.A client that providessockets
for communicating through HTTP proxies via the HTTP CONNECT method.Contains the method used to execute the connect along with the created socket.Holds all of the variables needed to describe an HTTP connection to a proxy.Signals violation of HTTP specification caused by an invalid redirectA connection manager that provides access to a single HttpConnection.Represents a Status-Line as returned from a HTTP server.The interface for the URI(Uniform Resource Identifiers) version of RFC 2396.The charset-changed normal operation to represent to be required to alert to user the fact the default charset is changed.A mapping to determine the (somewhat arbitrarily) preferred charset for a given locale.The URI parsing and escape encoding exception.Username and passwordCredentials
.
DefaultHttpMethodRetryHandler