C++ Actor Framework 1.0.0
|
Implicitly shared handle type that represents an HTTP client request with a promise for the HTTP response. More...
#include <request.hpp>
Public Member Functions | |
request (request &&other) noexcept | |
request (const request &other) noexcept | |
request & | operator= (request &&other) noexcept |
request & | operator= (const request &other) noexcept |
const request_header & | header () const |
Returns the HTTP header for the request. | |
const_byte_span | body () const |
Returns the HTTP body (payload) for the request. | |
const_byte_span | payload () const |
Returns the HTTP body (payload) for the request. | |
void | respond (status code, std::string_view content_type, const_byte_span content) const |
Sends an HTTP response message to the client. | |
void | respond (status code, std::string_view content_type, std::string_view content) const |
Sends an HTTP response message to the client. | |
Friends | |
class | router |
Implicitly shared handle type that represents an HTTP client request with a promise for the HTTP response.
const_byte_span caf::net::http::request::body | ( | ) | const |
Returns the HTTP body (payload) for the request.
valid()
const request_header & caf::net::http::request::header | ( | ) | const |
Returns the HTTP header for the request.
valid()
const_byte_span caf::net::http::request::payload | ( | ) | const |
Returns the HTTP body (payload) for the request.
valid()
void caf::net::http::request::respond | ( | status | code, |
std::string_view | content_type, | ||
const_byte_span | content ) const |
Sends an HTTP response message to the client.
Automatically sets the Content-Type
and Content-Length
header fields.
valid()
void caf::net::http::request::respond | ( | status | code, |
std::string_view | content_type, | ||
std::string_view | content ) const |
Sends an HTTP response message to the client.
Automatically sets the Content-Type
and Content-Length
header fields.
valid()