RemoteViz::Rendering::HTTPHeaders Class Reference
[RemoteViz]

RemoteViz More...

#include <RemoteViz/Rendering/HTTPHeaders.h>

List of all members.

Public Member Functions

 HTTPHeaders ()
 HTTPHeaders (const HTTPHeaders &obj)
HTTPHeadersoperator= (const HTTPHeaders &obj)
 ~HTTPHeaders ()
void add (const std::string &name, const std::string &value)
void remove (const std::string &name)
void clear ()
size_t count () const
bool exists (const std::string &name) const
const std::string & getValue (const std::string &name) const
const std::string & getNameAt (size_t index) const

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.


Constructor & Destructor Documentation

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

Creates an empty object.

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

Copy constructor.

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

Destructor.


Member Function Documentation

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:
name the header to add to the collection.
value the content of the header.
void RemoteViz::Rendering::HTTPHeaders::clear (  ) 

Removes all headers.

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

Gets the number of HTTP headers.

Returns:
number of HTTP headers.
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.
const std::string& RemoteViz::Rendering::HTTPHeaders::getNameAt ( size_t  index  )  const

Retrieves the header name from a collection index.

Parameters:
index index of the header to retrieve
Returns:
the header name at the given index or an empty string if the given index does not exist.
const std::string& RemoteViz::Rendering::HTTPHeaders::getValue ( const std::string &  name  )  const

Retrieves the value of a given header.

Parameters:
name the 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.
HTTPHeaders& RemoteViz::Rendering::HTTPHeaders::operator= ( const HTTPHeaders obj  ) 

Copy assignment operator.

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

Removes the header value under the given name.

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

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

Open Inventor Toolkit reference manual, generated on 12 Sep 2022
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/