void post(ResponsePtr r, const LLSD& context, const LLSD& input) const { LLSD result; result["state"] = "complete"; result["test"] = "test"; r->result(result); }
virtual void get(ResponsePtr response, const LLSD& context) const { const LLSD& remainder = context["request"]["remainder"]; if (remainder.size() > 0) { const LLHTTPNode* node = followRemainder(remainder); if (!node) { response->notFound(); return; } Description desc; node->describe(desc); response->result(desc.getInfo()); return; } response->result(rootNode()->allNodePaths()); }
virtual void get(ResponsePtr response, const LLSD& context) const { int n = context["extra"]["value"]; LLSD info; info["value"] = n; info["positive"] = n > 0; info["zero"] = n == 0; info["negative"] = n < 0; response->result(info); }