Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
RemoteViz::Rendering::HTTPHeaders Class Reference

RemoteViz More...

#include <RemoteViz/Rendering/HTTPHeaders.h>

Public Member Functions

 HTTPHeaders ()
 Creates an empty object.
 
 HTTPHeaders (const HTTPHeaders &obj)
 Copy constructor.
 
HTTPHeadersoperator= (const HTTPHeaders &obj)
 Copy assignment operator.
 
 ~HTTPHeaders ()
 Destructor.
 
void add (const std::string &name, const std::string &value)
 Adds the given header value under the given name.
 
void remove (const std::string &name)
 Removes the header value under the given name.
 
void clear ()
 Removes all headers.
 
size_t count () const
 Gets the number of HTTP headers.
 
bool exists (const std::string &name) const
 Determines if the headers collection contains a header of the specified name, with any value.
 
const std::string & getValue (const std::string &name) const
 Retrieves the value of a given header.
 
const std::string & getNameAt (size_t index) const
 Retrieves the header name from a collection index.
 

Detailed Description

RemoteViz

This class represents the header configuration options for an HTTP request and response.

Note that HTTPHeaders treats header names in a case-insensitive manner.

Definition at line 48 of file HTTPHeaders.h.

Constructor & Destructor Documentation

◆ HTTPHeaders() [1/2]

RemoteViz::Rendering::HTTPHeaders::HTTPHeaders ( )

Creates an empty object.

◆ HTTPHeaders() [2/2]

RemoteViz::Rendering::HTTPHeaders::HTTPHeaders ( const HTTPHeaders obj)

Copy constructor.

◆ ~HTTPHeaders()

RemoteViz::Rendering::HTTPHeaders::~HTTPHeaders ( )

Destructor.

Member Function Documentation

◆ add()

void RemoteViz::Rendering::HTTPHeaders::add ( const std::string &  name,
const std::string &  value 
)

Adds the given header value under the given name.

If a header already exists with the given name, its value will be overwritten.

Parameters
namethe header to add to the collection.
valuethe content of the header.

◆ clear()

void RemoteViz::Rendering::HTTPHeaders::clear ( )

Removes all headers.

◆ count()

size_t RemoteViz::Rendering::HTTPHeaders::count ( ) const

Gets the number of HTTP headers.

Returns
number of HTTP headers.

◆ exists()

bool RemoteViz::Rendering::HTTPHeaders::exists ( const std::string &  name) const

Determines if the headers collection contains a header of the specified name, with any value.

param name the name of the header to check

Returns
true if the given header exists.

◆ getNameAt()

const std::string & RemoteViz::Rendering::HTTPHeaders::getNameAt ( size_t  index) const

Retrieves the header name from a collection index.

Parameters
indexindex of the header to retrieve
Returns
the header name at the given index or an empty string if the given index does not exist.

◆ getValue()

const std::string & RemoteViz::Rendering::HTTPHeaders::getValue ( const std::string &  name) const

Retrieves the value of a given header.

Parameters
namethe name of the header to check
Returns
the value of the given header name or an empty string if the given header does not exist.

◆ operator=()

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

Copy assignment operator.

◆ remove()

void RemoteViz::Rendering::HTTPHeaders::remove ( const std::string &  name)

Removes the header value under the given name.

Parameters
namethe name of the header to remove from the collection.

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