NetServices Stack source

Dependents:   HelloWorld ServoInterfaceBoardExample1 4180_Lab4

Embed: (wiki syntax)

« Back to documentation index

HTTPMap Class Reference

HTTPMap Class Reference

HTTP Client data container for key/value pairs. More...

#include <HTTPMap.h>

Inherits HTTPData, and std::map< string, string >.

Public Member Functions

 HTTPMap (const string &keyValueSep="=", const string &pairSep="&")
 Instantiates map.
virtual void clear ()
 Clears the content.


class HTTPClient

Detailed Description

HTTP Client data container for key/value pairs.

This class simplifies the use of key/value pairs requests and responses used widely among web APIs. Note that HTTPMap inherits from std::map<std::string,std::string>. You can therefore use any public method of that class, including the square brackets operator ( [ ] ) to access a value.

The data is encoded or decoded to/from a key/value pairs-formatted string, after url-encoding/decoding.

Definition at line 47 of file HTTPMap.h.

Constructor & Destructor Documentation

HTTPMap ( const string &  keyValueSep = "=",
const string &  pairSep = "&" 

Instantiates map.

keyValueSepKey/Value separator (defaults to "=")
pairSepPairs separator (defaults to "&")

Definition at line 30 of file HTTPMap.cpp.

Member Function Documentation

void clear (  ) [virtual]

Clears the content.

Definition at line 41 of file HTTPMap.cpp.