Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MAX44000 PWM_Tone_Library nexpaq_mdk
Fork of LED_Demo by
HTTPMap Class Reference
Map of key/value pairs Used to transmit POST data using the application/x-www-form-urlencoded encoding. More...
#include <HTTPMap.h>
Inherits IHTTPDataOut, and IHTTPDataOut.
Public Member Functions | |
HTTPMap () | |
Instantiates HTTPMap It supports at most 32 key/values pairs. | |
void | put (const char *key, const char *value) |
Put Key/Value pair The references to the parameters must remain valid as long as the clear() function is not called. | |
void | clear () |
Clear table. | |
HTTPMap () | |
Instantiates HTTPMap It supports at most 32 key/values pairs. | |
void | put (const char *key, const char *value) |
Put Key/Value pair The references to the parameters must remain valid as long as the clear() function is not called. | |
void | clear () |
Clear table. | |
Protected Member Functions | |
virtual void | readReset () |
Reset stream to its beginning Called by the HTTPClient on each new request. | |
virtual int | read (char *buf, size_t len, size_t *pReadLen) |
Read a piece of data to be transmitted. | |
virtual int | getDataType (char *type, size_t maxTypeLen) |
Get MIME type. | |
virtual bool | getIsChunked () |
Determine whether the HTTP client should chunk the data Used for Transfer-Encoding header. | |
virtual size_t | getDataLen () |
If the data is not chunked, get its size Used for Content-Length header. | |
virtual int | read (char *buf, size_t len, size_t *pReadLen) |
Read a piece of data to be transmitted. | |
virtual int | getDataType (char *type, size_t maxTypeLen) |
Get MIME type. | |
virtual bool | getIsChunked () |
Determine whether the HTTP client should chunk the data Used for Transfer-Encoding header. | |
virtual size_t | getDataLen () |
If the data is not chunked, get its size Used for Content-Length header. | |
Friends | |
class | HTTPClient |
Detailed Description
Map of key/value pairs Used to transmit POST data using the application/x-www-form-urlencoded encoding.
Definition at line 31 of file cellular/http/common/HTTPClient/data/HTTPMap.h.
Constructor & Destructor Documentation
HTTPMap | ( | ) |
Instantiates HTTPMap It supports at most 32 key/values pairs.
Definition at line 30 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.
Member Function Documentation
void clear | ( | void | ) |
Clear table.
Definition at line 46 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.
void clear | ( | ) |
Clear table.
size_t getDataLen | ( | ) | [protected, virtual] |
If the data is not chunked, get its size Used for Content-Length header.
Implements IHTTPDataOut.
Definition at line 150 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.
virtual size_t getDataLen | ( | ) | [protected, virtual] |
If the data is not chunked, get its size Used for Content-Length header.
Implements IHTTPDataOut.
int getDataType | ( | char * | type, |
size_t | maxTypeLen | ||
) | [protected, virtual] |
Get MIME type.
- Parameters:
-
type Internet media type from Content-Type header
Implements IHTTPDataOut.
Definition at line 138 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.
virtual int getDataType | ( | char * | type, |
size_t | maxTypeLen | ||
) | [protected, virtual] |
Get MIME type.
- Parameters:
-
type Internet media type from Content-Type header
Implements IHTTPDataOut.
virtual bool getIsChunked | ( | ) | [protected, virtual] |
Determine whether the HTTP client should chunk the data Used for Transfer-Encoding header.
Implements IHTTPDataOut.
bool getIsChunked | ( | ) | [protected, virtual] |
Determine whether the HTTP client should chunk the data Used for Transfer-Encoding header.
Implements IHTTPDataOut.
Definition at line 145 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.
void put | ( | const char * | key, |
const char * | value | ||
) |
Put Key/Value pair The references to the parameters must remain valid as long as the clear() function is not called.
- Parameters:
-
key The key to use value The corresponding value
void put | ( | const char * | key, |
const char * | value | ||
) |
Put Key/Value pair The references to the parameters must remain valid as long as the clear() function is not called.
- Parameters:
-
key The key to use value The corresponding value
Definition at line 35 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.
int read | ( | char * | buf, |
size_t | len, | ||
size_t * | pReadLen | ||
) | [protected, virtual] |
Read a piece of data to be transmitted.
- Parameters:
-
buf Pointer to the buffer on which to copy the data len Length of the buffer pReadLen Pointer to the variable on which the actual copied data length will be stored
Implements IHTTPDataOut.
Definition at line 57 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.
virtual int read | ( | char * | buf, |
size_t | len, | ||
size_t * | pReadLen | ||
) | [protected, virtual] |
Read a piece of data to be transmitted.
- Parameters:
-
buf Pointer to the buffer on which to copy the data len Length of the buffer pReadLen Pointer to the variable on which the actual copied data length will be stored
Implements IHTTPDataOut.
void readReset | ( | ) | [protected, virtual] |
Reset stream to its beginning Called by the HTTPClient on each new request.
Implements IHTTPDataOut.
Definition at line 52 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.
Generated on Tue Jul 12 2022 12:29:07 by
