31 #ifndef REMOTERESOURCE_H_
32 #define REMOTERESOURCE_H_
35 #include <curl/curl.h>
36 #include <curl/easy.h>
40 #include "InternalErr.h"
60 string d_remoteResourceUrl;
84 char d_error_buffer[CURL_ERROR_SIZE];
95 string d_resourceCacheFileName;
100 vector<string> *d_request_headers;
105 vector<string> *d_response_headers;
112 void setType(
const vector<string> *resp_hdrs );
118 void writeResourceToFile(
int fd);
127 d_response_headers(0),
128 d_request_headers(0),
130 d_resourceCacheFileName(
"")
156 throw libdap::Error(
"RemoteHttpResource::getCacheFileName() - STATE ERROR: Remote Resource Has Not Been Retrieved.");
157 return d_resourceCacheFileName;
165 throw libdap::Error(
"RemoteHttpResource::getCacheFileName() - STATE ERROR: Remote Resource Has Not Been Retrieved.");
166 return d_response_headers;
vector< string > * getResponseHeaders()
Returns a vector of HTTP headers received along with the response from the request for the remote res...
virtual ~RemoteHttpResource()
Releases any memory resources and also any existing cache file locks for the cached resource...
string getCacheFileName()
Returns the (read-locked) cache file name on the local system in which the content of the remote reso...
This class encapsulates a remote resource available via HTTP GET.
string getType()
Returns the DAP type string of the RemoteHttpResource.
void retrieveResource()
This method will check the cache for the resource.