added support for POST method and alternate ports (part of patch 649438)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -28,11 +28,12 @@ protected:
|
||||
wxStringToStringHashMap m_headers;
|
||||
bool m_read, m_proxy_mode;
|
||||
wxSockAddress *m_addr;
|
||||
wxString m_post_buf;
|
||||
public:
|
||||
wxHTTP();
|
||||
~wxHTTP();
|
||||
|
||||
bool Connect(const wxString& host);
|
||||
bool Connect(const wxString& host, unsigned short port = 0);
|
||||
bool Connect(wxSockAddress& addr, bool wait);
|
||||
bool Abort();
|
||||
wxInputStream *GetInputStream(const wxString& path);
|
||||
@@ -41,12 +42,14 @@ public:
|
||||
|
||||
void SetHeader(const wxString& header, const wxString& h_data);
|
||||
wxString GetHeader(const wxString& header);
|
||||
void SetPostBuffer(const wxString& post_buf);
|
||||
|
||||
void SetProxyMode(bool on);
|
||||
|
||||
protected:
|
||||
typedef enum {
|
||||
wxHTTP_GET,
|
||||
wxHTTP_POST,
|
||||
wxHTTP_HEAD
|
||||
} wxHTTP_Req;
|
||||
bool BuildRequest(const wxString& path, wxHTTP_Req req);
|
||||
|
Reference in New Issue
Block a user