29 #ifndef Pt_Http_Request_h
30 #define Pt_Http_Request_h
32 #include <Pt/Http/Api.h>
33 #include <Pt/Http/Message.h>
34 #include <Pt/Signal.h>
58 Request( Http::Connection& conn,
const std::string& url)
66 Request( Http::Connection& conn,
const char* url)
73 const std::string&
url()
const
121 void send(
bool finish =
true);
124 void beginSend(
bool finish =
true);
131 {
return _inputReceived; }
135 {
return _outputSent; }
144 { _inputReceived.send(*
this); }
148 { _outputSent.send(*
this); }
153 std::string _qparams;
154 Signal<Request&> _inputReceived;
155 Signal<Request&> _outputSent;
162 #endif // Pt_Http_Request_h
HTTP message progress.
Definition: Message.h:277
HTTP request message.
Definition: Request.h:43
const std::string & qparams() const
Returns the HTTP request URL query.
Definition: Request.h:101
HTTP message with header and body.
Definition: Message.h:381
void setQParams(const char *p)
Sets the URL query string.
Definition: Request.h:111
void setMethod(const char *m)
Sets the request method.
Definition: Request.h:97
Represents a connection between a Signal/Delegate and a slot.
Definition: Connection.h:90
Multicast Signal to call multiple slots.
Definition: Signal.h:109
Request(Http::Connection &conn, const std::string &url)
Construct with connection and URL.
Definition: Request.h:58
void setMethod(const std::string &m)
Sets the request method.
Definition: Request.h:92
void setUrl(const char *u)
Sets the request URL.
Definition: Request.h:83
Request(Http::Connection &conn, const char *url)
Construct with connection and URL.
Definition: Request.h:66
const std::string & url() const
Returns the HTTP request URL.
Definition: Request.h:73
const std::string & method() const
Returns the HTTP request method.
Definition: Request.h:87
Request(Http::Connection &conn)
Construct with connection.
Definition: Request.h:50
void setQParams(const std::string &p)
Sets the URL query string.
Definition: Request.h:106
void setUrl(const std::string &u)
Sets the request URL.
Definition: Request.h:78