Modified HTTPClient to fit lwip changes.
Fork of HTTPClient 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.
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. | |
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. | |
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 HTTPMap.h.
Constructor & Destructor Documentation
HTTPMap | ( | ) |
Instantiates HTTPMap It supports at most 32 key/values pairs.
Definition at line 30 of file HTTPMap.cpp.
Member Function Documentation
void clear | ( | ) |
Clear table.
Definition at line 46 of file HTTPMap.cpp.
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 HTTPMap.cpp.
int getDataType | ( | char * | type, |
size_t | maxTypeLen | ||
) | [protected, virtual] |
Get MIME type.
- Parameters:
-
[out] type Internet media type from Content-Type header [in] maxTypeLen is the size of the type buffer to write to
Implements IHTTPDataOut.
Definition at line 138 of file HTTPMap.cpp.
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 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:
-
[in] key The key to use [in] value The corresponding value
Definition at line 35 of file HTTPMap.cpp.
int read | ( | char * | buf, |
size_t | len, | ||
size_t * | pReadLen | ||
) | [protected, virtual] |
Read a piece of data to be transmitted.
- Parameters:
-
[out] buf Pointer to the buffer on which to copy the data [in] len Length of the buffer [out] pReadLen Pointer to the variable on which the actual copied data length will be stored
Implements IHTTPDataOut.
Definition at line 57 of file HTTPMap.cpp.
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 HTTPMap.cpp.
Generated on Fri Jul 15 2022 14:26:18 by 1.7.2