1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Make RequestHandler handle uploads

This commit is contained in:
Me No Dev
2015-11-19 22:52:52 +02:00
parent 20f372aefe
commit 50eb6d9ff2
5 changed files with 77 additions and 28 deletions

View File

@ -3,7 +3,10 @@
class RequestHandler {
public:
virtual bool canHandle(HTTPMethod method, String uri) { return false; }
virtual bool canUpload(String uri) { return false; }
virtual bool handle(ESP8266WebServer& server, HTTPMethod requestMethod, String requestUri) { return false; }
virtual void upload(ESP8266WebServer& server, String requestUri, HTTPUpload& upload) {}
RequestHandler* next() { return _next; }
void next(RequestHandler* r) { _next = r; }