rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWHttpHeaderList Class Reference
[HTTP]

Stores and organizes a collection of RWHttpHeaderBase objects. More...

#include <rw/http/RWHttpHeaderList.h>

List of all members.

Public Member Functions

 RWHttpHeaderList ()
bool addHeader (const RWHttpHeaderBase &hdr)
bool removeHeader (const RWCString &label)
RWCString getValue (const RWCString &label) const
size_t index (const RWCString &label) const
size_t entries () const
RWCString asString () const
RWHttpGenericHeader operator[] (size_t i) const

Detailed Description

RWHttpHeaderList provides a mechanism for storing and organizing a collection of RWHttpHeaderBase objects.


Constructor & Destructor Documentation

RWHttpHeaderList::RWHttpHeaderList ( void   )  [inline]

Constructs an empty RWHttpHeaderList.


Member Function Documentation

bool RWHttpHeaderList::addHeader ( const RWHttpHeaderBase hdr  ) 

Attempts to add an RWHttpHeaderBase object to the internal list of headers. If successful, it returns true. If the header cannot be added for any reason (for example, the header already exists), this function returns false.

RWCString RWHttpHeaderList::asString (  )  const

Returns a string representing the header list. The string is formatted for sending as part of a request to an HTTP server. The RWCString should contain 7-bit US-ASCII data.

size_t RWHttpHeaderList::entries ( void   )  const [inline]

Returns the number of headers currently stored in the RWHttpHeaderList.

RWCString RWHttpHeaderList::getValue ( const RWCString label  )  const

Returns an RWCString representing the value of the header associated with label. If no headers with that label exist in the RWHttpHeaderList, an empty string is returned. The RWCString should contain 7-bit US-ASCII data.

size_t RWHttpHeaderList::index ( const RWCString label  )  const [inline]

Returns the index where label is found. The RWCString should contain 7-bit US-ASCII data.

RWHttpGenericHeader RWHttpHeaderList::operator[] ( size_t  i  )  const [inline]

Returns an RWHttpGenericHeader.

bool RWHttpHeaderList::removeHeader ( const RWCString label  )  [inline]

Removes any header with a label of label from the RWHttpHeaderList. Returns true if the header is found and removed. Otherwise returns false. The RWCString should contain 7-bit US-ASCII data.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.