Class HTTPClientRequest
Represents a HTTP client request (as sent to the server).
Fields
Name | Type | Description |
---|---|---|
headers
|
DictionaryList!(string,false,12L,false) | All request headers |
httpVersion
|
HTTPVersion | The HTTP protocol version used for the request |
method
|
HTTPMethod | The HTTP method of the request |
requestURI
|
string | The request URI |
m_conn
|
vibe |
Properties
Name | Type | Description |
---|---|---|
bodyWriter [get]
|
vibe | An output stream suitable for writing the request body. |
contentLength [get, set]
|
long | Accesses the Content-Length header of the request. |
localAddress [get]
|
NetworkAddress | |
peerCertificate [get]
|
inout(TLSCertificateInformation) | |
remoteAddress [get]
|
NetworkAddress | |
contentType [get, set]
|
string | Returns the mime type part of the 'Content-Type' header. |
contentTypeParameters [get]
|
string | Returns any supplementary parameters of the 'Content-Type' header. |
host [get, set]
|
string | Shortcut to the 'Host' header (always present for HTTP 1.1) |
persistent [get]
|
bool | Determines if the connection persists across requests. |
Methods
Name | Description |
---|---|
writeBody
(data)
|
Writes the whole request body at once using raw bytes. |
writeFormBody
(key_value_map)
|
Writes the request body as form data. |
writeJsonBody
(data, allow_chunked)
|
Writes the request body as JSON data. |
writePart
(part)
|
|
toString
()
|
Aliases
Name | Description |
---|---|
requestURL
|
Compatibility alias - scheduled for deprecation |