To support HTTP methods using Casablanca/cpprestsdk you can use code like this
http_listener listener(U("http://localhost:10000/restdemo"));
listener.support(methods::GET, handle_get);
listener.support(methods::POST, handle_post);
listener.support(methods::PUT, handle_put);
listener.support(methods::DEL, handle_del);
This works fine when handle_get, handle_post, etc. are simply functions. But as soon as I try to implement this inside a Controller class with handle_get, handle_post, etc. being methods I get errors like:
error: no matching function for call to ‘Controller::handle_get()’
error: invalid use of non-static member function ‘void Controller::handle_get(web::http::http_request)
I don't see anything in the documentation for why methods wouldn't work. I also perused through the issues and didn't see anything relating to my problem.
Is there any obvious reason why listener.support would struggle to find the methods?