#include <Pt/Http/Reply.h>
HTTP reply message.
Inherits Message.
Public Types | |
| enum | StatusCode { Continue = 100, OK = 200, MultipleChoices = 300, BadRequest = 400, Unauthorized = 401, RequestEntityTooLarge = 413, InternalServerError = 500 } |
| HTTP reply status code. More... | |
Public Member Functions | |
| Reply (Http::Connection &conn) | |
| Construct with connection. | |
| void | beginSend (bool finish=true) |
| Begin sending the reply. | |
| std::iostream & | body () |
| Returns the body of the message. | |
| void | clear () |
| Clears all content. | |
| void | discard () |
| Discards the message body. | |
| MessageHeader & | header () |
| Returns the header of the message. | |
| const MessageHeader & | header () const |
| Returns the header of the message. | |
| void | setStatus (unsigned code, const std::string &txt) |
| Sets the HTTP status. | |
| void | setStatus (unsigned code, const char *txt) |
| Sets the HTTP status. | |
| unsigned | statusCode () const |
| Returns the HTTP status code. | |
| const std::string & | statusText () const |
| Returns the HTTP status text. | |
| enum StatusCode |