Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Structs HttpResponse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
module juptune.http.common;

struct HttpResponse
{
    /++ 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();
    ///
    HttpResponse opAssign(HttpResponse p);
    ///
    void putBody(const const ubyte[] body);
    /// The status of the response. 
    String reason();
    ///
    void setHeader(KeyT, ValueT)(KeyT key, ValueT value);
    /// The reason of the response. 
    uint status();
    ///
    HttpHeader tryGetHeader(KeyT)(KeyT key, bool wasFound);
    /// Sets the reason of the response. 
    void withReason(ReasonT)(ReasonT reason);
    /// Sets the status of the response. 
    void withStatus(uint status);
    
}

Documentation

Represents a HTTP response with a status code + reason; headers; a body, and trailers.

Aliases

Name Description
__xdtor

Functions

Name Description
body
headers
opAssign
putBody
reason

The status of the response.

setHeader
status

The reason of the response.

tryGetHeader
withReason

Sets the reason of the response.

withStatus

Sets the status of the response.