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

◆ execute_fetch_request()

fl::promise< response > fl::execute_fetch_request ( const fl::string & url,
const fetch_options & request )

Internal helper to execute a fetch request and return a promise.

Definition at line 72 of file fetch.cpp.

72 {
73 (void)request; // Unused in stub implementation
74 FL_WARN("HTTP fetch is not supported on non-WASM platforms. URL: " << url);
75
76 // Create error response
77 response error_response(501, "Not Implemented");
78 error_response.set_body("HTTP fetch is only available in WASM/browser builds. This platform does not support network requests.");
79
80 // Create resolved promise with error response
81 auto promise = fl::promise<response>::resolve(error_response);
82
83 return promise;
84}
static promise< T > resolve(const T &value)
Create a resolved promise with value.
Definition promise.h:81
Promise class that provides fluent .then() and .catch_() semantics This is a lightweight wrapper arou...
Definition promise.h:72
HTTP response class (unified interface)
Definition fetch.h:83
#define FL_WARN
Definition warn.h:12

References FL_WARN, fl::promise< T >::resolve(), and fl::response::set_body().

Referenced by fetch_delete(), fetch_get(), fetch_head(), fetch_http_options(), fetch_patch(), fetch_post(), fetch_put(), and fetch_request().

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