Open samkpo opened 1 year ago
If a subapi is created this will allow to define an endpoint like this very one if desired:
http_api subapi; subapi.get("/") = [&](http_request& request, http_response& response) { response.write("hello"); }; subapi.get("/world") = [&](http_request &request, http_response &response) { response.write("hello world"); }; http_api my_api; my_api.add_subapi("/hello", &subapi);
It allows us to definea method within the subapi route by the subapi itself.
If a subapi is created this will allow to define an endpoint like this very one if desired:
It allows us to definea method within the subapi route by the subapi itself.