Open Inventor Release 2026.1.1
 
Loading...
Searching...
No Matches
RemoteViz::Rendering::HTTPRequest Class Reference

RemoteViz More...

#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.
 

Detailed Description

RemoteViz

This class encapsulates an HTTP request message received by the service.

Definition at line 48 of file HTTPRequest.h.

Constructor & Destructor Documentation

◆ HTTPRequest() [1/4]

RemoteViz::Rendering::HTTPRequest::HTTPRequest ( )

Creates a GET / HTTP/1.1 HTTP request.

◆ HTTPRequest() [2/4]

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.

◆ HTTPRequest() [3/4]

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.

◆ HTTPRequest() [4/4]

RemoteViz::Rendering::HTTPRequest::HTTPRequest ( const HTTPRequest & obj)

Copy constructor.

◆ ~HTTPRequest()

RemoteViz::Rendering::HTTPRequest::~HTTPRequest ( )

Destructor.

Member Function Documentation

◆ getContentLength()

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).

◆ getContentType()

const std::string & RemoteViz::Rendering::HTTPRequest::getContentType ( ) const

Returns the value of the Content-Type header field.

◆ getHeaders()

const HTTPHeaders & RemoteViz::Rendering::HTTPRequest::getHeaders ( ) const

Returns HTTP headers.

◆ getHost()

const std::string & RemoteViz::Rendering::HTTPRequest::getHost ( ) const

Returns the value of the Host header field.

◆ getMethod()

const std::string & RemoteViz::Rendering::HTTPRequest::getMethod ( ) const

Returns the request method ("GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATH").

◆ getURI()

const Uri & RemoteViz::Rendering::HTTPRequest::getURI ( ) const

Returns the URI (Uniform Resource Identifier) being requested.

◆ getVersion()

const std::string & RemoteViz::Rendering::HTTPRequest::getVersion ( ) const

Returns the HTTP version for incoming request (example "HTTP/1.1").

◆ getVersionMajor()

int RemoteViz::Rendering::HTTPRequest::getVersionMajor ( ) const

HTTP uses a "major.minor" numbering scheme to indicate versions of the protocol.

Returns the version major.

◆ getVersionMinor()

int RemoteViz::Rendering::HTTPRequest::getVersionMinor ( ) const

HTTP uses a "major.minor" numbering scheme to indicate versions of the protocol.

Returns the version minor.

◆ operator=()

HTTPRequest & RemoteViz::Rendering::HTTPRequest::operator= ( const HTTPRequest & obj)

Copy assignment operator.


The documentation for this class was generated from the following file: