I start an api server with Boost Beast. I use the async http server. My goal is to do the same things as Express.js For now I route like this :
if(req.method() == http::verb::post)
{
if(req.target() == "/mypath")
{
//do stuff
}
else
if(req.method() == http::verb::get)
{
if(req.target() == "/another/path")
{
//do stuff
}
I would like to route like this :
route.get("/mypath", callback) ;
But how do that?