|
void | set_header (std::string key, std::string value) |
| Set the value of an existing header in the response.
|
|
void | add_header (std::string key, std::string value) |
| Add a new header to the response.
|
|
const std::string & | get_header_value (const std::string &key) |
|
| response (int code_) |
|
| response (std::string body_) |
|
| response (int code_, std::string body_) |
|
| response (returnable &&value) |
|
| response (returnable &value) |
|
| response (int code_, returnable &value) |
|
| response (int code_, returnable &&value) |
|
| response (response &&r) |
|
| response (std::string contentType, std::string body_) |
|
| response (int code_, std::string contentType, std::string body_) |
|
response & | operator= (const response &r)=delete |
|
response & | operator= (response &&r) noexcept |
|
bool | is_completed () const noexcept |
| Check if the response has completed (whether response.end() has been called)
|
|
void | clear () |
|
void | redirect (const std::string &location) |
| Return a "Temporary Redirect" response. More...
|
|
void | redirect_perm (const std::string &location) |
| Return a "Permanent Redirect" response. More...
|
|
void | moved (const std::string &location) |
| Return a "Found (Moved Temporarily)" response. More...
|
|
void | moved_perm (const std::string &location) |
| Return a "Moved Permanently" response. More...
|
|
void | write (const std::string &body_part) |
|
void | end () |
| Set the response completion flag and call the handler (to send the response).
|
|
void | end (const std::string &body_part) |
| Same as end() except it adds a body part right before ending.
|
|
bool | is_alive () |
| Check if the connection is still alive (usually by checking the socket status).
|
|
bool | is_static_type () |
| Check whether the response has a static file defined.
|
|
void | set_static_file_info (std::string path) |
| Return a static file as the response body.
|
|
void | set_static_file_info_unsafe (std::string path) |
| Return a static file as the response body without sanitizing the path (use set_static_file_info instead)
|
|