123456789101112131415161718192021222324252627282930313233module juptune.http.common;
struct HttpRequest
{
/++ ALIASES ++/
///
alias __xdtor = __MARMOS_BUG__;
/++ FUNCTIONS ++/
///
ArrayBase!(Malloc, 8LU, (length, capacity) => max(capacity, length) * 2, (length, capacity) => length < capacity / 2, (length, capacity) => capacity / 2, ubyte) body();
///
ArrayBase!(Malloc, 8LU, (length, capacity) => max(capacity, length) * 2, (length, capacity) => length < capacity / 2, (length, capacity) => capacity / 2, HttpHeader) headers();
/// The method of the request.
String method();
///
HttpRequest opAssign(HttpRequest p);
/// The path of the request.
String path();
///
void putBody(const const ubyte[] body);
///
void setHeader(KeyT, ValueT)(KeyT key, ValueT value);
///
HttpHeader tryGetHeader(KeyT)(KeyT key, bool wasFound);
/// Sets the method of the request.
void withMethod(MethodT)(MethodT method);
/// Sets the path of the request.
void withPath(PathT)(PathT path);
}
Represents a HTTP request with a method; headers; and a body.
| Name | Description |
|---|---|
| __xdtor |
| Name | Description |
|---|---|
| body | |
| headers | |
| method |
The method of the request. |
| opAssign | |
| path |
The path of the request. |
| putBody | |
| setHeader | |
| tryGetHeader | |
| withMethod |
Sets the method of the request. |
| withPath |
Sets the path of the request. |