Org.Apache.Http.Cookies Namespace

Provides cookie interfaces, origin details, specification factories, and header names for the Apache HTTP client.

Classes

Name Description
ClientCookie

Provides obsolete cookie attribute constants. Use IClientCookie instead.

CookieOrigin

CookieOrigin class incapsulates details of an origin server that are relevant when parsing, validating or matching HTTP cookies.

CookieSpecRegistry

Cookie specification registry that can be used to obtain the corresponding cookie specification implementation for a given type of type or version of cookie.

MalformedCookieException

Signals that a cookie is in some way invalid or illegal in a given context

SM

Constants and static helpers related to the HTTP state management.

Interfaces

Name Description
IClientCookie

Extends ICookie with access to the original cookie attributes supplied by the server.

ICookie

HTTP "magic-cookie" represents a piece of state information that the HTTP agent and the target server can exchange to maintain a session.

ICookieAttributeHandler

Ths interface represents a cookie attribute handler responsible for parsing, validating, and matching a specific cookie attribute, such as path, domain, port, etc.

ICookieSpec

Defines the cookie management specification.

ICookieSpecFactory

Defines a factory that supplies ICookieSpec objects.

ISetCookie

This interface represents a SetCookie response header sent by the origin server to the HTTP agent in order to maintain a conversational state.

ISetCookie2

This interface represents a SetCookie2 response header sent by the origin server to the HTTP agent in order to maintain a conversational state.

ISM

Defines the HTTP header names used to exchange cookies and advertise cookie specification support.

Remarks

Use ICookieSpec to parse response headers, validate cookies, match request targets, and format request headers. Parsing does not validate the returned cookies. Matching follows the selected cookie policy and does not replace validation or an expiration check.

Domain, path, and port restrictions depend on the selected specification. Under RFC 2965, port matching also checks the original Port attribute through IClientCookie. A stored port array alone does not establish that the server supplied this attribute.

These APIs bind the deprecated Java org.apache.http.cookie package. See the Android cookie source for the package declarations.