wifi webserver works again

This commit is contained in:
technyon
2022-04-29 20:48:33 +02:00
parent 0dd94a97a3
commit 0e9baed3a4
50 changed files with 440 additions and 466 deletions

29
lib/WebServer/src/Uri.h Normal file
View File

@@ -0,0 +1,29 @@
#ifndef URI_H
#define URI_H
#include <Arduino.h>
#include <vector>
class Uri {
protected:
const String _uri;
public:
Uri(const char *uri) : _uri(uri) {}
Uri(const String &uri) : _uri(uri) {}
Uri(const __FlashStringHelper *uri) : _uri(String(uri)) {}
virtual ~Uri() {}
virtual Uri* clone() const {
return new Uri(_uri);
};
virtual void initPathArgs(__attribute__((unused)) std::vector<String> &pathArgs) {}
virtual bool canHandle(const String &requestUri, __attribute__((unused)) std::vector<String> &pathArgs) {
return _uri == requestUri;
}
};
#endif