#include <RemoteViz/Rendering/HTTPRequest.h>
Public Member Functions | |
HTTPRequest () | |
Creates a GET / HTTP/1.1 HTTP request. | |
HTTPRequest (const std::string &method, const std::string &uri, int versionMajor, int versionMinor) | |
Creates a HTTP request with the given method, URI (Uniform Resource Identifier) and version. | |
HTTPRequest (const std::string &method, const std::string &uri, int versionMajor, int versionMinor, const HTTPHeaders &headers) | |
Creates a HTTP request with the given method, URI (Uniform Resource Identifier), version and headers. | |
HTTPRequest (const HTTPRequest &obj) | |
Copy constructor. | |
HTTPRequest & | operator= (const HTTPRequest &obj) |
Copy assignment operator. | |
~HTTPRequest () | |
Destructor. | |
const Uri & | getURI () const |
Returns the URI (Uniform Resource Identifier) being requested. | |
const std::string & | getMethod () const |
Returns the request method ("GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATH"). | |
const std::string & | getVersion () const |
Returns the HTTP version for incoming request (example "HTTP/1.1"). | |
int | getVersionMajor () const |
HTTP uses a "major.minor" numbering scheme to indicate versions of the protocol. | |
int | getVersionMinor () const |
HTTP uses a "major.minor" numbering scheme to indicate versions of the protocol. | |
int64_t | getContentLength () const |
Returns the value of the Content-Length header field. | |
const std::string & | getContentType () const |
Returns the value of the Content-Type header field. | |
const std::string & | getHost () const |
Returns the value of the Host header field. | |
const HTTPHeaders & | getHeaders () const |
Returns HTTP headers. | |
This class encapsulates an HTTP request message received by the service.
Definition at line 48 of file HTTPRequest.h.
RemoteViz::Rendering::HTTPRequest::HTTPRequest | ( | ) |
Creates a GET / HTTP/1.1 HTTP request.
RemoteViz::Rendering::HTTPRequest::HTTPRequest | ( | const std::string & | method, |
const std::string & | uri, | ||
int | versionMajor, | ||
int | versionMinor | ||
) |
Creates a HTTP request with the given method, URI (Uniform Resource Identifier) and version.
RemoteViz::Rendering::HTTPRequest::HTTPRequest | ( | const std::string & | method, |
const std::string & | uri, | ||
int | versionMajor, | ||
int | versionMinor, | ||
const HTTPHeaders & | headers | ||
) |
Creates a HTTP request with the given method, URI (Uniform Resource Identifier), version and headers.
RemoteViz::Rendering::HTTPRequest::HTTPRequest | ( | const HTTPRequest & | obj | ) |
Copy constructor.
RemoteViz::Rendering::HTTPRequest::~HTTPRequest | ( | ) |
Destructor.
int64_t RemoteViz::Rendering::HTTPRequest::getContentLength | ( | ) | const |
Returns the value of the Content-Length header field.
The value -1 indicates that the length is unknown (Content-Length header is not present).
const std::string & RemoteViz::Rendering::HTTPRequest::getContentType | ( | ) | const |
Returns the value of the Content-Type header field.
const HTTPHeaders & RemoteViz::Rendering::HTTPRequest::getHeaders | ( | ) | const |
Returns HTTP headers.
const std::string & RemoteViz::Rendering::HTTPRequest::getHost | ( | ) | const |
Returns the value of the Host header field.
const std::string & RemoteViz::Rendering::HTTPRequest::getMethod | ( | ) | const |
Returns the request method ("GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATH").
const Uri & RemoteViz::Rendering::HTTPRequest::getURI | ( | ) | const |
Returns the URI (Uniform Resource Identifier) being requested.
const std::string & RemoteViz::Rendering::HTTPRequest::getVersion | ( | ) | const |
Returns the HTTP version for incoming request (example "HTTP/1.1").
int RemoteViz::Rendering::HTTPRequest::getVersionMajor | ( | ) | const |
HTTP uses a "major.minor" numbering scheme to indicate versions of the protocol.
Returns the version major.
int RemoteViz::Rendering::HTTPRequest::getVersionMinor | ( | ) | const |
HTTP uses a "major.minor" numbering scheme to indicate versions of the protocol.
Returns the version minor.
HTTPRequest & RemoteViz::Rendering::HTTPRequest::operator= | ( | const HTTPRequest & | obj | ) |
Copy assignment operator.