HttpHeader

Constructors

this
this(cstring[][] standard_header_lists)

Constructor

Members

Aliases

HeaderFieldNames
alias HeaderFieldNames = .HeaderFieldNames

Type alias for request header field constant definitions

Functions

addCustomHeaders
void addCustomHeaders(cstring[] header_field_names)

Adds the elements of header_field_names to the set of request message header fields of interest.

http_version
HttpVersion http_version(HttpVersion v)

Sets the response HTTP version to v. v must be a known HttpVersion enumerator value and not be HttpVersion.Undefined.

http_version
HttpVersion http_version()

Gets the response HTTP version.

Variables

http_version_
HttpVersion http_version_;

HTTP version

Inherited Members

From ParamSet

Element
struct Element
Undocumented in source.
skip_null_values_on_iteration
bool skip_null_values_on_iteration;

Set to true to skip key/value pairs with a null value on 'foreach' iteration.

ulong_dec_length
auto ulong_dec_length;

Minimum required buffer length for decimal formatting of an uint value

opIndex
cstring opIndex(cstring key)

Obtains the parameter value corresponding to key. key must be one of the parameter keys passed on instantiation or added by a subclass.

opIn_r
cstring* opIn_r(cstring key)

Obtains the parameter value corresponding to key.

getElement
Element getElement(cstring key)

Obtains the parameter value corresponding to key, bundled with the original key.

getUnsigned
bool getUnsigned(cstring key, T n, bool is_set)
bool getUnsigned(cstring key, T n)

Obtains the parameter value corresponding to key which is expected to be an unsigned decimal integer number and not empty. key must be one of the parameter keys passed on instantiation or added by a subclass.

opIndexAssign
cstring opIndexAssign(cstring val, cstring key)

Sets the parameter value for key. Key must be one of the parameter keys passed on instantiation or added by a subclass.

set
bool set(cstring key, cstring val)

Sets the parameter value for key if key is one of the parameter keys passed on instantiation or added by a subclass.

set
bool set(cstring key, size_t val, mstring dec)

ditto

access
bool access(cstring key, void delegate(cstring key, ref cstring val) dg)

Invokes dg with the original key and a reference to the parameter value for key if key is one of parameter keys passed on instantiation or added by a subclass.

matches
bool matches(cstring key, cstring val)

Compares the parameter value corresponding to key with val in a case-insensitive manner.

opApply
int opApply(int delegate(ref cstring key, ref cstring val) dg)

'foreach' iteration over parameter key/value pairs

reset
void reset()

Resets all parameter values to null.

strncasecmp
int strncasecmp(cstring a, cstring b)

Compares a to b, treating ASCII characters case-insensitively. If a and b have a different length, the first common characters are compared. If these are equal, the longer string compares greater.

addKeys
void addKeys(cstring[] keys)

Adds an entry for key.

addKey
cstring addKey(cstring key)

Adds an entry for key.

get_
Element* get_(cstring key)

Looks up key in a case-insensitive manner.

tolower
mstring tolower(cstring key)

Converts key to lower case, writing to a separate buffer so that key is left untouched.

rehash
void rehash()

Rehashes the associative array.

iterate
void iterate(Element element, int delegate(ref cstring key, ref cstring val) dg, int result)

opApply() helper, invokes dg with element.key & val.

writeUnsigned
mstring writeUnsigned(mstring dst, ulong n)

Converts n to decimal representation, writing to dst. dst must be long enough to hold the result. The result will be written to the end of dst, returning a slice to the valid content in dst.

readUnsigned
cstring readUnsigned(cstring src, T x)

Converts str, which is expected to contain a decimal number, to the number it represents. Tailing and leading whitespace is allowed and will be trimmed. If src contains non-decimal digit characters after trimming, conversion will be stopped at the first non-decimal digit character.

Meta