ark::comms::HttpResponse
Defined in header “ark/comms/http_response.hh”.
A basic structure representing a response to an HTTP request. This can be encoded with the str() method, and is then acceptable for a reply to a client.
Methods
- std::string str()
Returns a string form of this response, suitable for transmitting to a client.
Variables
-
HttpResponseCode code= HttpResponseCode::OK
The response code. -
std::string version{“HTTP/1.1”}
The protocol version. -
std::map< std::string, std::string > fields
Header fields (key/value pairs). -
std::optional< std::string > payload
The payload, if any.