27 #ifndef _bes_http_REMOTE_HTTP_RESOURCE_H_
28 #define _bes_http_REMOTE_HTTP_RESOURCE_H_ 1
30 #include <curl/curl.h>
31 #include <curl/easy.h>
36 #include "InternalErr.h"
39 #include "RemoteResource.h"
53 std::string d_remoteResourceUrl;
70 std::string d_resourceCacheFileName;
76 std::vector<std::string> *d_response_headers;
79 std::map<std::string, std::string> *d_http_response_headers;
87 void setType(
const std::vector<std::string> *resp_hdrs);
93 void writeResourceToFile(
int fd);
99 void ingest_http_headers_and_type();
111 unsigned int filter_retrieved_resource(
const std::string &template_str,
const std::string &update_str);
115 d_fd(0), d_initialized(
false), d_resourceCacheFileName(
""),
116 d_response_headers(0), d_http_response_headers(0) {
127 void retrieveResource(
const std::string &template_key,
const std::string &replace_value);
std::string get_response_as_string()
std::string getCacheFileName()
std::string get_http_response_header(const std::string header_name)
std::vector< std::string > * getResponseHeaders()
rapidjson::Document get_as_json()
get_as_json() This function returns the cached resource parsed into a JSON document.
virtual ~RemoteResource()
GenericDocument< UTF8<> > Document
GenericDocument with UTF8 encoding.
utility class for the HTTP catalog module