add Http::allow_redirects(bool allow_redirects) method
This commit is contained in:
@@ -51,6 +51,8 @@ class Http : public WinixBase
|
||||
public:
|
||||
|
||||
static const long HTTP_STATUS_200_OK = 200;
|
||||
static const long HTTP_STATUS_301_Moved_Permanently = 301;
|
||||
static const long HTTP_STATUS_302_Found = 302;
|
||||
|
||||
|
||||
Http();
|
||||
@@ -143,6 +145,12 @@ public:
|
||||
Http & add_bearer_token(const wchar_t * token);
|
||||
Http & add_bearer_token(const std::wstring & token);
|
||||
|
||||
/*
|
||||
* if allow_redirects is true then we follow any Location http headers
|
||||
* default: true
|
||||
*/
|
||||
void allow_redirects(bool allow_redirects);
|
||||
|
||||
bool get(const wchar_t * url, std::wstring & out, bool clear_str = true);
|
||||
bool get(const std::wstring & url, std::wstring & out, bool clear_str = true);
|
||||
bool get(const pt::WTextStream & url, std::wstring & out, bool clear_str = true);
|
||||
@@ -180,6 +188,7 @@ private:
|
||||
std::wstring * output_content_type;
|
||||
long debug_mode;
|
||||
pt::Space * debug_info;
|
||||
bool follow_location;
|
||||
|
||||
std::wstring temp_header;
|
||||
std::string temp_header_ascii;
|
||||
|
||||
Reference in New Issue
Block a user