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