diff --git a/examples/client_example/main.cc b/examples/client_example/main.cc index c85b50f8..da344024 100644 --- a/examples/client_example/main.cc +++ b/examples/client_example/main.cc @@ -19,11 +19,14 @@ int main() auto client=HttpAppFramework::instance().newHttpClient(netaddr.toIp(),80); auto req=HttpAppFramework::instance().newHttpRequest(); req->setMethod(drogon::HttpRequest::kGet); + int count=0; for(int i=0;i<10;i++) - client->sendRequest(req,[](ReqResult result,const HttpResponse &response){ + client->sendRequest(req,[&](ReqResult result,const HttpResponse &response){ std::cout<<"receive response!"<