Http Response. More...
#include <HttpResponse.h>
Public Types | |
| enum | StatusCode { UnKnown = 0 , Ok = 200 , MovedPermanently = 301 , BadRequest = 400 , NotFound = 404 } |
Public Member Functions | |
| HttpResponse (bool close) | |
| Constructor Function. | |
| virtual | ~HttpResponse ()=default |
| Destructor Function. | |
| void | SetStatusCode (StatusCode code) |
| Set StatusCode. | |
| void | SetStatusMessage (const std::string &message) |
| Set StatusMessage. | |
| void | SetCloseConnection (bool on) |
| Set CloseConnection. | |
| bool | CloseConnection () const |
| Get CloseConnection. | |
| void | SetContentType (const std::string &contentType) |
| Set ContentType. | |
| void | AddHeader (const std::string &name, const std::string &value) |
| Add a header. | |
| void | SetBody (const std::string &body) |
| Set body. | |
| void | AppendToBuffer (Buffer *output) |
| Append this response to Buffer. | |
Private Attributes | |
| std::unordered_map< std::string, std::string > | m_Header |
| This response header. | |
| StatusCode | m_StatusCode |
| StatusCode. | |
| std::string | m_StatusMessage |
| StatusMessage. | |
| bool | m_CloseConnection |
| CloseConnection. | |
| std::string | m_Body |
| Body. | |
Http Response.
Definition at line 22 of file HttpResponse.h.