MCPcopy Create free account
hub / github.com/FastLED/FastLED / createRequest

Function createRequest

tests/fl/remote/rpc_http_stream.cpp:20–27  ·  view source on GitHub ↗

Helper to create JSON-RPC request

Source from the content-addressed store, hash-verified

18
19// Helper to create JSON-RPC request
20static json createRequest(const char* method, const json& params, const json& id) {
21 json req = json::object();
22 req.set("jsonrpc", "2.0");
23 req.set("method", method);
24 req.set("params", params);
25 req.set("id", id);
26 return req;
27}
28
29// Helper to extract result from JSON-RPC response
30static fl::optional<json> getResult(const json& response) {

Callers 1

FL_TEST_FILEFunction · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected