TwitterExample with newer library (2012Aug)

Dependencies:   EthernetNetIf HTTPClient mbed

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, std::map< string, string >, HTTPData, and std::map< string, string >.

Public Member Functions

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

Friends

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 LPC1768/services/http/client/data/HTTPMap.h.


Constructor & Destructor Documentation

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

Instantiates map.

Parameters:
keyValueSepKey/Value separator (defaults to "=")
pairSepPairs separator (defaults to "&")
HTTPMap ( const string &  keyValueSep = "=",
const string &  pairSep = "&" 
)

Instantiates map.

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

Member Function Documentation

virtual void clear (  ) [virtual]

Clears the content.

virtual void clear (  ) [virtual]

Clears the content.