| 44 | } |
| 45 | |
| 46 | static bool http_get_json(HttpRequest&, HttpResponse& res) |
| 47 | { |
| 48 | acl::json json; |
| 49 | acl::json_node& root = json.get_root(); |
| 50 | root.add_number("code", 200) |
| 51 | .add_text("status", "+ok") |
| 52 | .add_child("data", |
| 53 | json.create_node() |
| 54 | .add_text("name", "value") |
| 55 | .add_bool("success", true) |
| 56 | .add_number("number", 100)); |
| 57 | return res.write(json); |
| 58 | } |
| 59 | |
| 60 | static bool http_post_json(HttpRequest& req, HttpResponse& res) |
| 61 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…