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

Function http_get_json

app/wizard_demo/ht/main.cpp:46–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46static 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
60static bool http_post_json(HttpRequest& req, HttpResponse& res)
61{

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…