Closed EmperorArthur closed 3 years ago
HI,
Thanks for the Feature Request.
To save both of us spending some time back and forth, could you please provide some MRE : How to create a Minimal, Reproducible Example to demonstrate your case. I'll certainly spend some time later to investigate and fix the library.
Regards,
Hello,
Unfortunately, this request is only truly needed when #28 is implemented. Our use case is the server/router living in "main.cpp", and each individual component (".h/.cpp" file) having their own THandlerFunction
. This allows for modularity of the system, and is how almost all Model View Controller (MVC) web frameworks operate.*
As #28 is closed as WontFix, this issue is mute for our use case.
* For more information, Dask and Laravel are my recommended starting points, depending on language preference.
Thanks for your interests and feedbacks anyway.
I'll spend some time to add separate cpp folder later, but have to close the issue now.
Hello,
I am currently examining the feasibility of switching from our current custom (but extremely fast) Arduino web server code. In doing so, I noticed that the default on methods, and
FunctionRequestHandler
only call functions which have no arguments.That is a serious issue, since it means the server code must be a global, and breaks all sorts of best practices.
My cheap and dirty work around is something like this, but due to the next bug, I can't even test it with our current code base.
Edit: With something like this, the
EthernetServer().on(...)
functions can be overloaded to support both versions.