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(const(char)[] name, const(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(const(char)[] comment)

Set the comment associated with this cookie

setDomain
Cookie setDomain(const(char)[] domain)

Set the domain of this cookie

setMaxAge
Cookie setMaxAge(long maxAge)

Set the maximum duration of this cookie

setName
Cookie setName(const(char)[] name)

Set the name of this cookie

setPath
Cookie setPath(const(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(const(char)[] value)

Set the value of this cookie

setVersion
Cookie setVersion(uint vrsn)

Set the version of this cookie

Variables

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

Meta