#include <http.hpp>
Public Member Functions | |
Response ()=default | |
Response (Response &&other)=default | |
Response & | operator= (Response &&other)=default |
Response (const Response &other)=delete | |
Response & | operator= (const Response &other)=delete |
~Response ()=default | |
Response & | setCode (Code code) |
Sets the HTTP response code of the message. | |
const Code & | getCode () const |
Gets the HTTP response code of the message. | |
![]() | |
MessageBase () | |
MessageBase (MessageBase &&other)=default | |
MessageBase & | operator= (MessageBase &&other)=default |
MessageBase (const MessageBase &other)=delete | |
MessageBase & | operator= (const MessageBase &other)=delete |
virtual | ~MessageBase ()=default |
MessageBase & | setVersion (const std::string &version) |
Sets the HTTP version of the message. | |
MessageBase & | setBody (const std::string &body) |
Sets the body of the message. | |
MessageBase & | setBodyWithContentLength (const std::string &body) |
Sets the body of the message. | |
MessageBase & | addHeader (Header header, const std::string &value) |
Adds a header to the message. | |
MessageBase & | setHeader (Header header, const std::string &value) |
Set a header in the message. | |
std::vector< std::string > | getHeader (Header header) const |
Gets the value of a header. | |
const std::string & | getVersion () const |
Gets the version of the message. | |
const HeadersList & | getHeaders () const |
Gets the headers of the message. | |
const std::string & | getBody () const |
Gets the body of the message. | |
|
default |
|
default |
|
default |
Gets the HTTP response code of the message.
Sets the HTTP response code of the message.
[in] | code | The response code to set. |