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

Function makeRequest

tests/fl/remote/remote.cpp:19–28  ·  view source on GitHub ↗

Test helper to create JSON-RPC request

Source from the content-addressed store, hash-verified

17
18// Test helper to create JSON-RPC request
19fl::json makeRequest(const char* method, fl::json params = fl::json::array(), int id = 1, fl::u32 timestamp = 0) {
20 fl::json req = fl::json::object();
21 req.set("method", method);
22 req.set("params", params);
23 req.set("id", id);
24 if (timestamp > 0) {
25 req.set("timestamp", static_cast<fl::i64>(timestamp));
26 }
27 return req;
28}
29
30// Request/Response queues for testing
31struct TestIO {

Callers 1

FL_TEST_FILEFunction · 0.85

Calls 2

arrayClass · 0.50
setMethod · 0.45

Tested by

no test coverage detected