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

Method response

src/platforms/wasm/js_fetch.cpp.hpp:135–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void WasmFetchRequest::response(const FetchResponseCallback& callback) {
136 FL_WARN("Starting JavaScript-based fetch request to: " << mUrl);
137
138 // Generate unique request ID for this request
139 u32 request_id = getCallbackManager().generateRequestId();
140
141 // Store the callback for when JavaScript calls back (using move semantics)
142 getCallbackManager().storeCallback(request_id, FetchResponseCallback(callback));
143
144 FL_WARN("Stored callback for request ID: " << request_id);
145
146 // Start the JavaScript fetch (non-blocking) with request ID
147 js_fetch_async(request_id, mUrl.c_str());
148}
149
150#endif // FL_IS_WASM
151

Callers 2

fetchFunction · 0.80
execute_fetch_requestFunction · 0.80

Calls 3

generateRequestIdMethod · 0.80
storeCallbackMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected