#include <cgicc/HTTPResponseHeader.h>
Inheritance diagram for cgicc::HTTPResponseHeader::
Public Methods | |
Constructor and Destructor | |
HTTPResponseHeader (const std::string &http_version, int status_code, const std::string &reason_phrase) | |
Create a new HTTP response header. More... | |
virtual | ~HTTPResponseHeader () |
Delete this HTTPResponseHeader. More... | |
Additional Header Management | |
HTTPResponseHeader & | addHeader (const std::string &header) |
Add a general, response, or entity header to this one. More... | |
HTTPResponseHeader & | addHeader (const std::string &name, const std::string &value) |
Add a general, response, or entity header to this one. More... | |
const std::vector< std::string > & | getHeaders () const |
Get a list of all additional headers. More... | |
Cookie Management | |
HTTPResponseHeader & | setCookie (const HTTPCookie &cookie) |
Set a cookie to go out with this HTTPResponseHeader. More... | |
const std::vector< HTTPCookie > & | getCookies () const |
Get a list of all cookies associated with this header. More... | |
Accessor methods | |
Retrieve information on the header | |
const std::string & | getHTTPVersion () const |
Get the HTTP version. More... | |
int | getStatusCode () const |
Get the 3-digit status code. More... | |
std::string | getReasonPhrase () const |
Get the reason phrase associated with the stats code. More... | |
Mutator methods | |
Set information on the header | |
HTTPResponseHeader & | getHTTPVersion (const std::string &http_version) |
Set the HTTP version. More... | |
HTTPResponseHeader & | getStatusCode (int status_code) |
Get the 3-digit status code. More... | |
HTTPResponseHeader & | getReasonPhrase (const std::string &reason_phrase) |
Get the reason phrase associated with the stats code. More... | |
Inherited Methods | |
virtual void | render (std::ostream &out) const |
Write this object to a stream. More... |
This class represents an HTTP response header as defined in section 6 of RFC 2616 (see http://www.w3.org)
All HTTP/1.1 reponses consist of an initial status line containing the HTTP version, a 3-digit status code, and a human-readable reason phrase explaining the status code.
The first digit of the Status-Code defines the class of response. The last two digits do not have any categorization role. There are 5 values for the first digit:
Definition at line 71 of file HTTPResponseHeader.h.
|
Create a new HTTP response header.
|
|
Delete this HTTPResponseHeader.
|
|
Add a general, response, or entity header to this one.
|
|
Add a general, response, or entity header to this one.
|
|
Get a list of all cookies associated with this header.
Definition at line 144 of file HTTPResponseHeader.h. |
|
Get a list of all additional headers.
Definition at line 125 of file HTTPResponseHeader.h. |
|
Set the HTTP version.
The HTTP version is a string of the form
Definition at line 201 of file HTTPResponseHeader.h. |
|
Get the HTTP version.
The HTTP version is a string of the form
Definition at line 162 of file HTTPResponseHeader.h. |
|
Get the reason phrase associated with the stats code.
The reason phrase is a human-readable interpretation of the status code
Definition at line 223 of file HTTPResponseHeader.h. |
|
Get the reason phrase associated with the stats code.
The reason phrase is a human-readable interpretation of the status code
Definition at line 182 of file HTTPResponseHeader.h. |
|
Get the 3-digit status code.
The 3-digit status code indicates the disposition of the response.
Definition at line 212 of file HTTPResponseHeader.h. |
|
Get the 3-digit status code.
The 3-digit status code indicates the disposition of the response.
Definition at line 172 of file HTTPResponseHeader.h. |
|
Write this object to a stream.
Subclasses must implement this function.
Reimplemented from cgicc::MStreamable. |
|
Set a cookie to go out with this HTTPResponseHeader.
|