mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
fix: std::string && req parameter
This commit is contained in:
parent
ec29121c22
commit
8371bdb09f
@ -13,7 +13,7 @@ struct ExampleMiddleware
|
||||
{
|
||||
std::string message;
|
||||
|
||||
ExampleMiddleware() : message(std::string("foo"))
|
||||
ExampleMiddleware() : message("foo")
|
||||
{
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ int main()
|
||||
|
||||
// To see it in action submit {ip}:18080/add/1/2 and you should receive 3 (exciting, isn't it)
|
||||
CROW_ROUTE(app,"/add/<int>/<int>")
|
||||
([](const crow::request& /*req*/, crow::response& res, int a, int b){
|
||||
([](crow::response& res, int a, int b){
|
||||
std::ostringstream os;
|
||||
os << a+b;
|
||||
res.write(os.str());
|
||||
|
Loading…
Reference in New Issue
Block a user