Org.Apache.Http.Protocol Namespace

Org.Apache.Http.Protocol.HttpRequestExecutor is a processor for the client side, Org.Apache.Http.Protocol.HttpService for the server side.

Remarks

HTTP protocol execution framework. Apart from simply sending and receiving messages, there are a lot of things to consider when communicating with HTTP. Many details such as transport encodings or connection management are handled by setting up or interpreting Org.Apache.Http.IHeader in the messages. In order to relieve applications from the responsibility of implementing these nitty-gritty details of the protocol, HTTP components provides an execution framework that sets up some of the headers before sending a message, and interprets headers when a message has been received.

An HTTP Org.Apache.Http.Protocol.IHttpProcessor typically keeps lists of so-called interceptors that will be executed before a message is sent and after it has been received. An application should initialize a processor, set up the lists with the required and desired processors, and then communicate through that processor. There are four kinds of interceptors, depending on whether they act on Org.Apache.Http.IHttpRequestInterceptor or Org.Apache.Http.IHttpResponseInterceptor, on the client or server side:
ClientServer
Requestprepares headers before a request is sentinterprets headers when a request is received
Responseinterprets headers when a response is receivedprepares headers before a response is sent

Org.Apache.Http.Protocol.HttpRequestExecutor is a processor for the client side, Org.Apache.Http.Protocol.HttpService for the server side. On the client side, a Org.Apache.Http.Protocol.HttpContext is used to tie together a request, the response to it, and other data that might be associated with the request execution. It is passed to the request executor whenever needed.

Information about required and recommended interceptors for the client side will be provided elsewhere. For the time being, please refer to the comments in the example applications or ask on one of the mailing lists.

Note: If you want to develop a server-side application, we recommend that you implement your application as a servlet running in a servlet engine like or full-blown JSEE container like . If you prefer to implement a server-side application based on our Org.Apache.Http.Protocol.HttpService, we'll assume that you know what you're doing and that you don't need help in figuring out which interceptors need to be configured.

Classes

TypeReason
BasicHttpContextDefault implementation of the Org.Apache.Http.Protocol.HttpContext.
BasicHttpContext+InterfaceConstsDocumentation for this section has not yet been entered.
BasicHttpProcessorKeeps lists of interceptors for processing requests and responses.
DefaultedHttpContext Org.Apache.Http.Protocol.HttpContext implementation that delegates resolution of an attribute to the given default Org.Apache.Http.Protocol.HttpContext instance if the attribute is not present in the local one.
DefaultedHttpContext+InterfaceConstsDocumentation for this section has not yet been entered.
ExecutionContext Org.Apache.Http.Protocol.HttpContext attribute names for protocol execution.
ExecutionContextConstsDocumentation for this section has not yet been entered.
HTTPConstants and static helpers related to the HTTP protocol.
HttpContextA context for executing a request.
HttpContextConstsDocumentation for this section has not yet been entered.
HttpDateGeneratorGenerates a date in the format required by the HTTP protocol.
HttpRequestExecutorSends HTTP requests and receives the responses.
HttpRequestHandlerRegistryMaintains a map of HTTP request handlers keyed by a request URI pattern.
HttpServiceMinimalistic server-side implementation of an HTTP processor.
IHttpContextA context for executing a request.
IHttpExpectationVerifierDefines an interface to verify whether an incoming HTTP request meets the target server's expectations.
IHttpProcessorPerforms interceptor processing of requests and responses.
IHttpRequestHandler [Android Documentation]
IHttpRequestHandlerResolverInterface to be implemented by objects that can resolve Org.Apache.Http.Protocol.IHttpRequestHandler instances by request URI.
IHttpRequestInterceptorListProvides access to an ordered list of request interceptors.
IHttpResponseInterceptorListProvides access to an ordered list of response interceptors.
RequestConnControlA request interceptor that suggests connection keep-alive to the server.
RequestContentA request interceptor that decides about the transport encoding.
RequestDateA request interceptor that adds a Date header.
RequestExpectContinueA request interceptor that enables the expect-continue handshake.
RequestTargetHostA request interceptor that sets the Host header for HTTP/1.1 requests.
RequestUserAgentA request interceptor that adds a User-Agent header.
ResponseConnControlA response interceptor that suggests connection keep-alive to the client.
ResponseContentA response interceptor that sets up entity-related headers.
ResponseDateA response interceptor that adds a Date header.
ResponseServerA response interceptor that adds a Server header.
SyncBasicHttpContextThread-safe extension of the Org.Apache.Http.Protocol.BasicHttpContext.
UriPatternMatcherMaintains a map of objects keyed by a request URI pattern.