Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
|
Encapsulates a set of HTTP header information. More...
#include <HttpHeaders.h>
Public Member Functions | |
HttpHeaders (const HttpHeaders &headers) | |
String | toString (HttpHeaderFieldName name) const |
String | toString (HttpHeaderFieldName name, const String &value) const |
HttpHeaderFieldName | fromString (const String &name) const |
Find the enumerated value for the given field name string. More... | |
const String & | operator[] (const String &name) const |
Fetch a reference to the header field value by name. More... | |
String & | operator[] (const String &name) |
Fetch a reference to the header field value by name. More... | |
String | operator[] (unsigned index) const |
Return the HTTP header line for the value at the given index. More... | |
bool | contains (const String &name) const |
void | remove (const String &name) |
void | setMultiple (const HttpHeaders &headers) |
HttpHeaders & | operator= (const HttpHeaders &headers) |
void | clear () |
DateTime | getLastModifiedDate () const |
DateTime | getServerDate () const |
Static Public Member Functions | |
static String | toString (const String &name, const String &value) |
Produce a string for output in the HTTP header, with line ending. More... | |
Private Types | |
typedef bool(* | comparator) (const HttpHeaderFieldName &, const HttpHeaderFieldName &) |
Private Member Functions | |
unsigned int | count () const |
const HttpHeaderFieldName & | keyAt (unsigned int idx) const |
HttpHeaderFieldName & | keyAt (unsigned int idx) |
const String & | valueAt (unsigned int idx) const |
String & | valueAt (unsigned int idx) |
const String & | operator[] (const HttpHeaderFieldName &key) const |
String & | operator[] (const HttpHeaderFieldName &key) |
void | allocate (unsigned int newSize) |
int | indexOf (const HttpHeaderFieldName &key) const |
bool | contains (const HttpHeaderFieldName &key) const |
void | removeAt (unsigned index) |
void | remove (const HttpHeaderFieldName &key) |
void | setMultiple (const HashMap< HttpHeaderFieldName, String > &map) |
void | setNullValue (const String &nullv) |
Private Attributes | |
HttpHeaderFieldName ** | keys |
String ** | values |
String | nil |
uint16_t | currentIndex |
uint16_t | size |
comparator | cb_comparator |
Encapsulates a set of HTTP header information.
HttpHeaderFieldName HttpHeaders::fromString | ( | const String & | name | ) | const |
Find the enumerated value for the given field name string.
name |
HttpHeaderFieldName | field name code, HTTP_HEADER_UNKNOWN if not recognised |
Fetch a reference to the header field value by name.
name |
String& | Reference to value |
|
inline |
Return the HTTP header line for the value at the given index.
index |
String |