Created
February 24, 2022 19:46
-
-
Save tablatronix/41636b639d23b462dfa271519c23f0a4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// lib A | |
Global Server; | |
void on(const Uri &uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn); | |
server->on("/", std::bind(&myClass::handler, this, handlerArg)); | |
void myClass::handler(bool arg){ | |
Server->blargh(); | |
} | |
// lib B | |
Global Server (async) | |
AsyncCallbackWebHandler& on(const char* uri, WebRequestMethodComposite method, ArRequestHandlerFunction onRequest, ArUploadHandlerFunction onUpload, ArBodyHandlerFunction onBody); | |
server->on("/", std::bind(&myClass::handler, this, std::placeholders::_1, handlerArg)); | |
void myClass::handler(AsyncWebServerRequest *request,bool arg){ | |
request->blargh(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment