mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-28 09:47:14 +02:00
Adding path arguments to WebServer (#1994)
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
#ifndef REQUESTHANDLER_H
|
||||
#define REQUESTHANDLER_H
|
||||
|
||||
#include <vector>
|
||||
#include <assert.h>
|
||||
|
||||
class RequestHandler {
|
||||
public:
|
||||
virtual ~RequestHandler() { }
|
||||
@ -14,6 +17,15 @@ public:
|
||||
|
||||
private:
|
||||
RequestHandler* _next = nullptr;
|
||||
|
||||
protected:
|
||||
std::vector<String> pathArgs;
|
||||
|
||||
public:
|
||||
const String& pathArg(unsigned int i) {
|
||||
assert(i < pathArgs.size());
|
||||
return pathArgs[i];
|
||||
}
|
||||
};
|
||||
|
||||
#endif //REQUESTHANDLER_H
|
||||
|
Reference in New Issue
Block a user