Kea  1.9.9-git
isc::http::HttpHeader Class Reference

Represents HTTP header including a header name and value. More...

#include <http_header.h>

+ Inheritance diagram for isc::http::HttpHeader:

Public Member Functions

 HttpHeader (const std::string &header_name, const std::string &header_value="")
 Constructor. More...
 
std::string getLowerCaseName () const
 Returns lower case header name. More...
 
std::string getLowerCaseValue () const
 Returns lower case header value. More...
 
std::string getName () const
 Returns header name. More...
 
uint64_t getUint64Value () const
 Returns header value as unsigned integer. More...
 
std::string getValue () const
 Returns header value. More...
 
bool isValueEqual (const std::string &v) const
 Case insensitive comparison of header value. More...
 

Detailed Description

Represents HTTP header including a header name and value.

It includes methods for retrieving header name and value in lower case and for case insensitive comparison of header values.

Definition at line 20 of file http_header.h.

Constructor & Destructor Documentation

isc::http::HttpHeader::HttpHeader ( const std::string &  header_name,
const std::string &  header_value = "" 
)
explicit

Constructor.

Parameters
header_nameHeader name.
header_valueHeader value.

Definition at line 17 of file http_header.cc.

Member Function Documentation

std::string isc::http::HttpHeader::getLowerCaseName ( ) const

Returns lower case header name.

Definition at line 34 of file http_header.cc.

References isc::util::str::lowercase().

Referenced by isc::http::HttpMessage::getHeader().

+ Here is the call graph for this function:

std::string isc::http::HttpHeader::getLowerCaseValue ( ) const

Returns lower case header value.

Definition at line 41 of file http_header.cc.

References isc::util::str::lowercase().

Referenced by isValueEqual().

+ Here is the call graph for this function:

std::string isc::http::HttpHeader::getName ( ) const
inline

Returns header name.

Definition at line 31 of file http_header.h.

Referenced by isc::http::HttpRequest::HttpRequest().

uint64_t isc::http::HttpHeader::getUint64Value ( ) const

Returns header value as unsigned integer.

Exceptions
BadValueif the header value is not a valid number.

Definition at line 23 of file http_header.cc.

References isc_throw.

std::string isc::http::HttpHeader::getValue ( ) const
inline

Returns header value.

Definition at line 36 of file http_header.h.

Referenced by isc::http::HttpRequest::HttpRequest().

bool isc::http::HttpHeader::isValueEqual ( const std::string &  v) const

Case insensitive comparison of header value.

Parameters
vValue to be compared.
Returns
true if header value is equal, false otherwise.

Definition at line 48 of file http_header.cc.

References getLowerCaseValue(), and isc::util::str::lowercase().

+ Here is the call graph for this function:


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