Response¶
-
class
response
: public std::streambuf¶ Represents a single response to a request. Inherits from
std::streambuf
, so it can be used as-is or with astd::ostream
.SHOW does not prevent mutliple response from being created or sent for a single request. Most of the time this is something that would break the application; however, under certain conditions in HTTP/1.1 multiple 100-type responses can be sent before a final 200+ response.
See also
std::streambuf
on cppreference.comstd::ostream
on cppreference.com
-
response
(connection&, http_protocol, const response_code&, const headers_t&)¶ Constructs a new response to the client who made a connection. The protocols, response code, and headers are immediately buffered and cannot be changed after the response is created, so they have to be passed to the constructor.
-
~response
()¶ Destructor for a response object; ensures the response is flushed
-
virtual void
flush
()¶ Ensure the content currently written to the request is sent to the client