Cookie

Defines the Cookie class, and the means for reading & writing them. Cookie implementation conforms with RFC 2109, but supports parsing of server-side cookies only. Client-side cookies are supported in terms of output, but response parsing is not yet implemented ...

See over <A HREF="http://www.faqs.org/rfcs/rfc2109.html">here</A> for the RFC document.

Constructors

this
this()

Construct an empty client-side cookie. You add these to an output request using HttpClient.addCookie(), or the equivalent.

this
this(char[] name, char[] value)

Construct a cookie with the provided attributes. You add these to an output request using HttpClient.addCookie(), or the equivalent.

Members

Functions

clear
Cookie clear()

Reset this cookie

produce
void produce(size_t delegate(const(void)[]) consume)

Output the cookie as a text stream, via the provided consumer

setComment
Cookie setComment(char[] comment)

Set the comment associated with this cookie

setDomain
Cookie setDomain(char[] domain)

Set the domain of this cookie

setMaxAge
Cookie setMaxAge(long maxAge)

Set the maximum duration of this cookie

setName
Cookie setName(char[] name)

Set the name of this cookie

setPath
Cookie setPath(char[] path)

Set the path of this cookie

setSecure
Cookie setSecure(bool secure)

Indicate whether this cookie should be considered secure or not

setValue
Cookie setValue(char[] value)

Set the value of this cookie

setVersion
Cookie setVersion(uint vrsn)

Set the version of this cookie

Variables

comment
char[] comment;
domain
char[] domain;
Undocumented in source.
maxAge
long maxAge;
Undocumented in source.
name
char[] name;
path
char[] path;
Undocumented in source.
secure
bool secure;
value
char[] value;
Undocumented in source.
vrsn
uint vrsn;
Undocumented in source.

Meta