2019-03-30 15:09:22 +00:00
|
|
|
#include "CustomCtrl.h"
|
|
|
|
//add definition of your processing function here
|
|
|
|
|
|
|
|
void CustomCtrl::hello(const HttpRequestPtr &req,
|
2019-05-09 03:25:25 +00:00
|
|
|
std::function<void(const HttpResponsePtr &)> &&callback,
|
2019-03-30 15:09:22 +00:00
|
|
|
const std::string &userName) const
|
|
|
|
{
|
|
|
|
auto resp = HttpResponse::newHttpResponse();
|
|
|
|
resp->setBody("<P>" + _greetings + ", " + userName + "</P>");
|
|
|
|
callback(resp);
|
|
|
|
}
|