mirror of
https://github.com/me-no-dev/ESPAsyncWebServer.git
synced 2026-01-30 18:12:16 +01:00
Make regex a define exclusive (#617)
* Change compiler error to runtime error. Add compiler warining when a ASYNCWEBSERVER_REGEX function is used, but not enabled * Update docs for usage in Arduino IDE * Update docs for platform.local.txt
This commit is contained in:
@@ -38,6 +38,12 @@
|
||||
#error Platform not supported
|
||||
#endif
|
||||
|
||||
#ifdef ASYNCWEBSERVER_REGEX
|
||||
#define ASYNCWEBSERVER_REGEX_ATTRIBUTE
|
||||
#else
|
||||
#define ASYNCWEBSERVER_REGEX_ATTRIBUTE __attribute__((warning("ASYNCWEBSERVER_REGEX not defined")))
|
||||
#endif
|
||||
|
||||
#define DEBUGF(...) //Serial.printf(__VA_ARGS__)
|
||||
|
||||
class AsyncWebServer;
|
||||
@@ -271,7 +277,7 @@ class AsyncWebServerRequest {
|
||||
bool hasArg(const char* name) const; // check if argument exists
|
||||
bool hasArg(const __FlashStringHelper * data) const; // check if F(argument) exists
|
||||
|
||||
const String& pathArg(size_t i) const;
|
||||
const String& ASYNCWEBSERVER_REGEX_ATTRIBUTE pathArg(size_t i) const;
|
||||
|
||||
const String& header(const char* name) const;// get request header value by name
|
||||
const String& header(const __FlashStringHelper * data) const;// get request header value by F(name)
|
||||
|
||||
Reference in New Issue
Block a user