29 #ifndef Pt_Http_Reply_h
30 #define Pt_Http_Reply_h
32 #include <Pt/Http/Api.h>
33 #include <Pt/Http/Message.h>
34 #include <Pt/Signal.h>
54 MultipleChoices = 300,
57 RequestEntityTooLarge = 413,
58 InternalServerError = 500
64 explicit Reply(Http::Connection& conn)
72 void setStatus(
unsigned code,
const std::string& txt)
88 {
return _statusCode; }
92 {
return _statusText; }
104 void beginSend(
bool finish =
true);
111 {
return _inputReceived; }
115 {
return _outputSent; }
124 { _inputReceived.send(*
this); }
128 { _outputSent.send(*
this); }
131 unsigned _statusCode;
132 std::string _statusText;
133 Signal<Reply&> _inputReceived;
134 Signal<Reply&> _outputSent;
141 #endif // Pt_Http_Reply_h
HTTP message progress.
Definition: Message.h:277
Reply(Http::Connection &conn)
Construct with connection.
Definition: Reply.h:64
void setStatus(unsigned code, const std::string &txt)
Sets the HTTP status.
Definition: Reply.h:72
HTTP message with header and body.
Definition: Message.h:381
Represents a connection between a Signal/Delegate and a slot.
Definition: Connection.h:90
HTTP reply message.
Definition: Reply.h:43
Multicast Signal to call multiple slots.
Definition: Signal.h:109
const std::string & statusText() const
Returns the HTTP status text.
Definition: Reply.h:91
StatusCode
HTTP reply status code.
Definition: Reply.h:50
void setStatus(unsigned code, const char *txt)
Sets the HTTP status.
Definition: Reply.h:80
unsigned statusCode() const
Returns the HTTP status code.
Definition: Reply.h:87