mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-04 20:57:50 +08:00
12 lines
447 B
C++
Executable File
12 lines
447 B
C++
Executable File
#include "TestController.h"
|
|
using namespace example;
|
|
void TestController::asyncHandleHttpRequest(const HttpRequestPtr& req,const std::function<void (const HttpResponsePtr &)>&callback)
|
|
{
|
|
//write your application logic here
|
|
auto resp=HttpResponse::newHttpResponse();
|
|
LOG_DEBUG<<"!!!!!!!!!!1";
|
|
resp->setStatusCode(HttpResponse::k200OK);
|
|
resp->setContentTypeCode(CT_TEXT_HTML);
|
|
resp->setBody("hello!!!");
|
|
callback(resp);
|
|
} |