fix cmpiler complains

This commit is contained in:
Me No Dev 2015-12-19 19:50:42 +02:00
parent b1f276a1a7
commit 3b7054a3dd
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,5 @@
#ifndef _AsyncWebServer_H_
#define _AsyncWebServer_H_
#ifndef _ESPAsyncWebServer_H_
#define _ESPAsyncWebServer_H_
#include "Arduino.h"

View File

@ -68,7 +68,10 @@ void AsyncWebServer::on(const char* uri, WebRequestMethod method, ArRequestHandl
}
void AsyncWebServer::on(const char* uri, ArRequestHandlerFunction onRequest){
on(uri, HTTP_ANY, onRequest);
AsyncCallbackWebHandler* handler = new AsyncCallbackWebHandler();
handler->setUri(uri);
handler->onRequest(onRequest);
addHandler(handler);
}
void AsyncWebServer::serveStatic(const char* uri, fs::FS& fs, const char* path, const char* cache_header){