From 6726df139d6b7cee980676ef6b671049252461d1 Mon Sep 17 00:00:00 2001
From: Martin Chang
Most of the above programs can be automatically generated by the command line tool drogon_ctl
provided by drogon (The cammand is drogon_ctl create controller TestCtrl
). All the user needs to do is add their own business logic. In the example, the controller returns a Hello, world!
string when the client accesses the http://ip/test
URL.
Most of the above programs can be automatically generated by the command line tool drogon_ctl
provided by drogon (The command is drogon_ctl create controller TestCtrl
). All the user needs to do is add their own business logic. In the example, the controller returns a Hello, world!
string when the client accesses the http://ip/test
URL.
For JSON format response, we create the controller as follows:
diff --git a/lib/tests/integration_test/server/index.html b/lib/tests/integration_test/server/index.html index daef9455..6c0c8aab 100644 --- a/lib/tests/integration_test/server/index.html +++ b/lib/tests/integration_test/server/index.html @@ -115,7 +115,7 @@ void TestCtrl::asyncHandleHttpRequest(const HttpRequestPtr& req, } ``` -Most of the above programs can be automatically generated by the command line tool drogon_ctl
provided by drogon (The cammand is drogon_ctl create controller TestCtrl
). All the user needs to do is add their own business logic. In the example, the controller returns a Hello, world!
string when the client accesses the http://ip/test
URL.
Most of the above programs can be automatically generated by the command line tool drogon_ctl
provided by drogon (The command is drogon_ctl create controller TestCtrl
). All the user needs to do is add their own business logic. In the example, the controller returns a Hello, world!
string when the client accesses the http://ip/test
URL.
For JSON format response, we create the controller as follows: