| 9 | |
| 10 | #ifndef USE_LAMBDA |
| 11 | static bool http_get_default(const char* path, HttpRequest& req, HttpResponse& res) |
| 12 | { |
| 13 | acl::string buf, method_buf; |
| 14 | acl::http_method_t method = req.getMethod(&method_buf); |
| 15 | buf.format("%s: hello world!, method=%d, %s\r\n", |
| 16 | path, (int) method, method_buf.c_str()); |
| 17 | res.setContentLength(buf.size()); |
| 18 | return res.write(buf); |
| 19 | } |
| 20 | #endif |
| 21 | |
| 22 | static bool http_get_root(HttpRequest&, HttpResponse& res) |