Skip to content

Instantly share code, notes, and snippets.

@tablatronix
Created February 24, 2022 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tablatronix/41636b639d23b462dfa271519c23f0a4 to your computer and use it in GitHub Desktop.
Save tablatronix/41636b639d23b462dfa271519c23f0a4 to your computer and use it in GitHub Desktop.
// 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