tango.net.http.HttpParams

License:

BSD style: see license.txt

Version:

Initial release: April 2004

Author:

Kris
class HttpParams : HttpTokens, HttpParamsView
Maintains a set of query parameters, parsed from an HTTP request. Use HttpParams instead for output parameters.
Note that these input params may have been encoded by the user- agent. Unfortunately there has been little consensus on what that encoding should be (especially regarding GET query-params). With luck, that will change to a consistent usage of UTF-8 within the near future.
this()
Construct parameters by telling the HttpStack that name/value pairs are seperated by a '=' character.
uint size()
Return the number of headers
void parse(InputBuffer input) [override]
Read all query parameters. Everything is mapped rather than being allocated & copied
void add(const(char)[] name, const(char)[] value) [override]
Add a name/value pair to the query list
void addInt(const(char)[] name, int value)
Add a name/integer pair to the query list
void addDate(const(char)[] name, Time value) [override]
Add a name/date(long) pair to the query list
const(char)[] get(const(char)[] name, const(char)[] ret = null) [override]
Return the value of the provided header, or null if the header does not exist
int getInt(const(char)[] name, int ret = -1) [override]
Return the integer value of the provided header, or the provided default-value if the header does not exist
Time getDate(const(char)[] name, Time ret = epoch) [override]
Return the date value of the provided header, or the provided default-value if the header does not exist
void produce(scope size_t delegate(const(void)[]) consume, const(char)[] eol = null) [override]
Output the param list to the provided consumer