|
@@ -47,6 +47,8 @@ std::string dump_request(Context& cxt)
|
|
|
int main(void)
|
|
int main(void)
|
|
|
{
|
|
{
|
|
|
if (true) {
|
|
if (true) {
|
|
|
|
|
+ const char* s = "abcde";
|
|
|
|
|
+
|
|
|
// DSL style
|
|
// DSL style
|
|
|
HTTP_SERVER("localhost", 1234) {
|
|
HTTP_SERVER("localhost", 1234) {
|
|
|
|
|
|
|
@@ -57,6 +59,10 @@ int main(void)
|
|
|
GET("/home", {
|
|
GET("/home", {
|
|
|
res.set_content(dump_request(cxt));
|
|
res.set_content(dump_request(cxt));
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ GET("/abcde", {
|
|
|
|
|
+ res.set_content(s);
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
// Regular style
|
|
// Regular style
|