#include <RemoteViz/Rendering/HTTPRequest.h>
Public Member Functions | |
HTTPRequest () | |
HTTPRequest (const std::string &method, const std::string &uri, int versionMajor, int versionMinor) | |
HTTPRequest (const std::string &method, const std::string &uri, int versionMajor, int versionMinor, const HTTPHeaders &headers) | |
HTTPRequest (const HTTPRequest &obj) | |
HTTPRequest & | operator= (const HTTPRequest &obj) |
~HTTPRequest () | |
const Uri & | getURI () const |
const std::string & | getMethod () const |
| |
const std::string & | getVersion () const |
int | getVersionMajor () const |
int | getVersionMinor () const |
int64_t | getContentLength () const |
const std::string & | getContentType () const |
const std::string & | getHost () const |
const HTTPHeaders & | getHeaders () const |
This class encapsulates an HTTP request message received by the service.
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.