handy_httpd.components.request

Contains HTTP request components.

Members

Enums

Method
enum Method

Enumeration of all possible HTTP request methods as unsigned integer values for efficient logic.

Functions

methodFromIndex
Method methodFromIndex(size_t idx)

Gets a method using a zero-based index of the method enum value.

methodFromName
Method methodFromName(string name)

Gets a Method enum value from a string. Defaults to GET for unknown names.

methodIndex
size_t methodIndex(Method method)

Gets the zero-based index of a method enum value, useful for histograms.

methodMaskFromAll
ushort methodMaskFromAll()

Gets a mask that contains every method.

methodMaskFromMethods
ushort methodMaskFromMethods(Method[] methods)

Builds a bitmask from the given list of methods.

methodMaskFromNames
ushort methodMaskFromNames(string[] names)

Builds a bitmask from the given list of method names.

methodMaskToStrings
string[] methodMaskToStrings(ushort mask)

Converts a method mask to a list of strings representing method names.

methodToName
string methodToName(Method method)

Gets the string representation of a Method enum value.

readBodyAsMultipartFormData (from handy_httpd.components.multipart)
MultipartFormData readBodyAsMultipartFormData(HttpRequest request, bool allowInfiniteRead) via public import handy_httpd.components.multipart : readBodyAsMultipartFormData, MultipartFormData, MultipartElement;

For convenience, provide access to multipart functionality.

Static variables

METHOD_COUNT
auto METHOD_COUNT;

Constant that defines the number of available methods.

Structs

HttpRequest
struct HttpRequest

The data which the server provides to HttpRequestHandlers so that they can formulate a response.

MultipartElement (from handy_httpd.components.multipart)
struct MultipartElement via public import handy_httpd.components.multipart : readBodyAsMultipartFormData, MultipartFormData, MultipartElement;

For convenience, provide access to multipart functionality.

MultipartFormData (from handy_httpd.components.multipart)
struct MultipartFormData via public import handy_httpd.components.multipart : readBodyAsMultipartFormData, MultipartFormData, MultipartElement;

For convenience, provide access to multipart functionality.