MCPcopy Create free account
hub / github.com/acl-dev/acl / http_get_json

Function http_get_json

app/wizard/tmpl/http/main_fiber.cpp:49–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49static 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
63static bool http_get_xml(HttpRequest&, HttpResponse& res)
64{

Callers

nothing calls this directly

Calls 2

create_nodeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…