]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/HTTPRequest.hxx
Introduce SGBinaryFile
[simgear.git] / simgear / io / HTTPRequest.hxx
index cc7ffd28dcb2b713f9f9ad0f02b25788ce9109d7..0def08880162c667d9f714f490dc99dbdd0ecbd4 100644 (file)
@@ -37,6 +37,8 @@ namespace simgear
 namespace HTTP
 {
 
+class Client;
+
 /**
  * Base class for HTTP request (and answer).
  */
@@ -131,6 +133,9 @@ public:
     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;
@@ -194,16 +199,6 @@ public:
 
     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;
 
@@ -241,6 +236,10 @@ private:
     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;