| 34 | } |
| 35 | |
| 36 | static bool http_post_ok(HttpRequest& req, HttpResponse& res) |
| 37 | { |
| 38 | acl::string buf; |
| 39 | if (!req.getBody(buf)) { |
| 40 | printf("getBody error!\r\n"); |
| 41 | return false; |
| 42 | } |
| 43 | |
| 44 | printf("body: %s\r\n", buf.c_str()); |
| 45 | res.setContentLength(buf.size()); |
| 46 | return res.write(buf); |
| 47 | } |
| 48 | |
| 49 | static bool http_get_json(HttpRequest&, HttpResponse& res) |
| 50 | { |