@@ -147,7 +147,12 @@ class WebServer {
147
147
void on (const Uri &uri, THandlerFunction fn);
148
148
void on (const Uri &uri, HTTPMethod method, THandlerFunction fn);
149
149
void on (const Uri &uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn); // ufn handles file uploads
150
+ bool removeRoute (const char *uri);
151
+ bool removeRoute (const char *uri, HTTPMethod method);
152
+ bool removeRoute (const String &uri);
153
+ bool removeRoute (const String &uri, HTTPMethod method);
150
154
void addHandler (RequestHandler *handler);
155
+ bool removeHandler (RequestHandler *handler);
151
156
void serveStatic (const char *uri, fs::FS &fs, const char *path, const char *cache_header = NULL );
152
157
void onNotFound (THandlerFunction fn); // called when handler is not assigned
153
158
void onFileUpload (THandlerFunction ufn); // handle file uploads
@@ -230,6 +235,7 @@ class WebServer {
230
235
return _currentClient.write_P (b, l);
231
236
}
232
237
void _addRequestHandler (RequestHandler *handler);
238
+ bool _removeRequestHandler (RequestHandler *handler);
233
239
void _handleRequest ();
234
240
void _finalizeResponse ();
235
241
bool _parseRequest (NetworkClient &client);
0 commit comments