# Package com.meterware.httpunit.cookies

package com.meterware.httpunit.cookies

Classes to support cookie handling. Supports the HTTP state mechanism. The central class of this package is the `CookieJar`, which acts as a repository of `Cookie` objects. There are two main ways to get cookies into the CookieJar. The first is to construct the CookieJar, passing a `CookieSource` to its constructor. This will cause the CookieJar to parse the Set-Cookie headers from the source object. The second is to copy them from another CookieJar through use of the `updateCookies(CookieJar)` method.

The CookieJar can also produce a Cookie header to be sent as part of a request. The `CookieJar.getCookieHeaderField(URL)` method will select any cookies that it has which can be sent to the specified URL and assemble them into an appropriate header.

Related Packages
Package
Description
com.meterware.httpunit
Classes for testing http server systems.
com.meterware.httpunit.parsing
Classes to control HTML parsing.
com.meterware.httpunit.scripting
Class
Description
Cookie
An HTTP client-side cookie.
CookieJar
A collection of HTTP cookies, which can interact with cookie and set-cookie header values.
CookieListener
An interface for classes which can listen for cookies being rejected and the reason.
CookieProperties
Controls behavior for cookies.
CookieSource
This interface represents a source from which to parse out cookies.