namespace HTTP
{
+class Client;
+
/**
* Base class for HTTP request (and answer).
*/
virtual std::string url() const
{ return _url; }
+ Client* http() const
+ { return _client; }
+
virtual std::string scheme() const;
virtual std::string path() const;
virtual std::string host() const;
ReadyState readyState() const { return _ready_state; }
- /**
- * Request aborting this request.
- */
- void abort();
-
- /**
- * Request aborting this request and specify the reported reaseon for it.
- */
- void abort(const std::string& reason);
-
bool closeAfterComplete() const;
bool isComplete() const;
void processBodyBytes(const char* s, int n);
void setReadyState(ReadyState state);
+ void setCloseAfterComplete();
+
+ Client* _client; // HTTP client we're active on
+
std::string _method;
std::string _url;
StringMap _request_headers;