#include <HTTPResponse.h>
Inheritance diagram for HTTPResponse:
Suppressed default methods | |
HTTPResponse (const HTTPResponse &rs) | |
HTTPResponse () | |
HTTPResponse & | operator= (const HTTPResponse &) |
Public Member Functions | |
HTTPResponse (FILE *s, int status, vector< string > *h, const string &temp_file) | |
virtual | ~HTTPResponse () |
Accessors | |
virtual vector< string > * | get_headers () const |
Mutators | |
virtual void | set_headers (vector< string > *h) |
Definition at line 53 of file HTTPResponse.h.
HTTPResponse::HTTPResponse | ( | ) | [inline, protected] |
Definition at line 62 of file HTTPResponse.h.
HTTPResponse::HTTPResponse | ( | const HTTPResponse & | rs | ) | [inline, protected] |
Definition at line 64 of file HTTPResponse.h.
HTTPResponse::HTTPResponse | ( | FILE * | s, | |
int | status, | |||
vector< string > * | h, | |||
const string & | temp_file | |||
) | [inline] |
Build an HTTPResponse object. An instance of this class is used to return an HTTP response (body and headers). If the response is really from a remote server, the current HTTP code stores the body in a temporary file and the headers in a vector<string> object. This class will delete those resources when its destructor is called. If the response does not have a temporary file that needs to be deleted (say it actually comes from a local cache or was read directly into memory), the temp file should be set to "".
s | FILE * to the response. Read the response body from this stream. | |
status | The HTTP response status code. | |
h | Response headers. This class will delete the pointer when the instance that contains it is destroyed. | |
temp_file | Name a the temporary file that holds the response body; this file is deleted when this instance is deleted. |
Definition at line 89 of file HTTPResponse.h.
virtual HTTPResponse::~HTTPResponse | ( | ) | [inline, virtual] |
When an instance is destroyed, free the temporary resources: the temp_file and headers are deleted. If the tmp file name is "", it is not deleted.
Definition at line 101 of file HTTPResponse.h.
References close_temp(), DBG, DBGN, and dods_keep_temps.
Here is the call graph for this function:
virtual vector<string>* HTTPResponse::get_headers | ( | ) | const [inline, virtual] |
HTTPResponse& HTTPResponse::operator= | ( | const HTTPResponse & | ) | [inline, protected] |
Definition at line 66 of file HTTPResponse.h.
virtual void HTTPResponse::set_headers | ( | vector< string > * | h | ) | [inline, virtual] |
Definition at line 124 of file HTTPResponse.h.