]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/protocol/http.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git] / include / wx / protocol / http.h
index 476df9189abcbd38f16b9691b1d2897e5bedcf1e..cfa2e6f944403a957ee0266e5683ac6c1f51b670 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Guilhem Lavaux
 // Modified by: Simo Virokannas (authentication, Dec 2005)
 // Created:     August 1997
-// RCS-ID:      $Id$
 // Copyright:   (c) 1997, 1998 Guilhem Lavaux
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -36,6 +35,7 @@ public:
     wxString GetHeader(const wxString& header) const;
     int GetResponse() const { return m_http_response; }
 
+    void SetMethod(const wxString& method) { m_method = method; }
     void SetHeader(const wxString& header, const wxString& h_data);
     bool SetPostText(const wxString& contentType,
                      const wxString& data,
@@ -51,19 +51,12 @@ public:
     wxDEPRECATED(void SetPostBuffer(const wxString& post_buf));
 
 protected:
-    enum wxHTTP_Req
-    {
-        wxHTTP_GET,
-        wxHTTP_POST,
-        wxHTTP_HEAD
-    };
-
     typedef wxStringToStringHashMap::iterator wxHeaderIterator;
     typedef wxStringToStringHashMap::const_iterator wxHeaderConstIterator;
     typedef wxStringToStringHashMap::iterator wxCookieIterator;
     typedef wxStringToStringHashMap::const_iterator wxCookieConstIterator;
 
-    bool BuildRequest(const wxString& path, wxHTTP_Req req);
+    bool BuildRequest(const wxString& path, const wxString& method);
     void SendHeaders();
     bool ParseHeaders();
 
@@ -81,6 +74,7 @@ protected:
 
     // internal variables:
 
+    wxString m_method;
     wxStringToStringHashMap m_cookies;
 
     wxStringToStringHashMap m_headers;