-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for removing routes in WebServer library (#9832)
* feat: added removeRoutes and removeHandler methods * feat: added removeRoute and removeHandler methods * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
- Loading branch information
1 parent
211520b
commit 849ec57
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
849ec57
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honest question:
Why do we need
bool removeRoute(const char *uri);
when we already havebool removeRoute(const String &uri);
which also works when called likeremoveRoute("foobar");
?849ec57
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should have actually been implemented through the
const char *
path in order to conserve memory when Strings are not used. Valid concern, but also not a big deal849ec57
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's just one of those Arduino things, like passing heavy objects by value instead of reference, one can find without looking very hard. ;-)
anyway, thanks for answering.