C++ Actor Framework 1.0.0
|
Allows users to respond to an incoming HTTP request at some later time. More...
#include <responder.hpp>
Public Member Functions | |
promise (responder &parent) | |
promise (const promise &) noexcept=default | |
promise & | operator= (const promise &) noexcept=default |
void | respond (status code) |
Sends an HTTP response that only consists of a header with a status code such as status::no_content . | |
void | respond (status code, std::string_view content_type, const_byte_span content) |
Sends an HTTP response message to the client. | |
void | respond (status code, std::string_view content_type, std::string_view content) |
Sends an HTTP response message to the client. | |
void | respond (status code, const error &what) |
Sends an HTTP response message with an error to the client. | |
lower_layer::server * | down () |
Returns a pointer to the HTTP layer. | |
Allows users to respond to an incoming HTTP request at some later time.
Sends an HTTP response message with an error to the client.
Converts what
to a string representation and then transfers this description to the client.
void caf::net::http::responder::promise::respond | ( | status | code, |
std::string_view | content_type, | ||
const_byte_span | content ) |
Sends an HTTP response message to the client.
Automatically sets the Content-Type
and Content-Length
header fields.
void caf::net::http::responder::promise::respond | ( | status | code, |
std::string_view | content_type, | ||
std::string_view | content ) |
Sends an HTTP response message to the client.
Automatically sets the Content-Type
and Content-Length
header fields.