FastLED 3.9.15
Loading...
Searching...
No Matches

◆ fetch() [2/2]

void fl::fetch ( const fl::string & url,
const FetchCallback & callback )

Make an HTTP GET request (cross-platform, backward compatible)

Parameters
urlThe URL to fetch
callbackFunction to call with the response

On WASM/browser platforms: Uses native JavaScript fetch() API On Arduino/embedded platforms: Immediately calls callback with error response

Definition at line 63 of file fetch.cpp.

63 {
64 (void)url; // Unused in stub implementation
65 // For embedded platforms, immediately call callback with a "not supported" response
66 response resp(501, "Not Implemented");
67 resp.set_text("HTTP fetch not supported on this platform");
68 callback(resp);
69}
HTTP response class (unified interface)
Definition fetch.h:83

References fl::response::set_text().

Referenced by fetch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: