26 #ifndef _httpconnect_h 27 #define _httpconnect_h 32 #include <curl/curl.h> 35 #include <curl/easy.h> 41 #ifndef _object_type_h 42 #include "ObjectType.h" 46 #include "HTTPCache.h" 49 #ifndef http_response_h 50 #include "HTTPResponse.h" 64 extern int www_trace_extensive;
65 extern int dods_keep_temps;
80 char d_error_buffer[CURL_ERROR_SIZE];
81 std::string d_content_type;
83 bool d_accept_deflate;
91 vector<string> d_request_headers;
93 int d_dap_client_protocol_major;
94 int d_dap_client_protocol_minor;
96 bool d_use_cpp_streams;
99 long read_url(
const string &url, FILE *stream, vector<string> *resp_hdrs,
100 const vector<string> *headers = 0);
105 bool url_uses_proxy_for(
const string &url);
106 bool url_uses_no_proxy_for(
const string &url)
throw();
108 void extract_auth_info(
string &url);
110 friend size_t save_raw_http_header(
void *ptr,
size_t size,
size_t nmemb,
112 friend class HTTPConnectTest;
113 friend class ParseHeader;
135 bool use_cpp_streams()
const {
return d_use_cpp_streams; }
136 void set_use_cpp_streams(
bool use_cpp_streams) { d_use_cpp_streams = use_cpp_streams; }
164 #endif // _httpconnect_h
void set_cache_enabled(bool mode)
void set_credentials(const string &u, const string &p)
void set_cookie_jar(const string &cookie_jar)
void set_cache_enabled(bool enabled)
HTTPResponse * fetch_url(const string &url)
top level DAP object to house generic methods
void set_accept_deflate(bool defalte)
bool is_cache_enabled() const
void set_xdap_protocol(int major, int minor)