mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-28 05:01:28 +03:00
ESP8266WebServer: Add variadic template version of collectHeaders() (#7296)
* More user-friendly, less RODATA usage. eg. `webServer.collectHeaders(F("Content-Type"), F("Origin"));` In this example, less about 20 bytes than the traditional way.
This commit is contained in:
committed by
GitHub
parent
8ffe41b7df
commit
47b8947e72
@ -138,6 +138,8 @@ public:
|
||||
int args() const; // get arguments count
|
||||
bool hasArg(const String& name) const; // check if argument exists
|
||||
void collectHeaders(const char* headerKeys[], const size_t headerKeysCount); // set the request headers to collect
|
||||
template<typename... Args>
|
||||
void collectHeaders(const Args&... args); // set the request headers to collect (variadic template version)
|
||||
const String& header(const String& name) const; // get request header value by name
|
||||
const String& header(int i) const; // get request header value by number
|
||||
const String& headerName(int i) const; // get request header name by number
|
||||
|
Reference in New Issue
Block a user