FastLED 3.10.8
Loading...
Searching...
No Matches

◆ execute_fetch_request()

fl::task::Promise< Response > fl::net::http::execute_fetch_request ( const fl::string & url,
const FetchOptions & request )

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

Definition at line 411 of file fetch.cpp.hpp.

411 {
412 FL_UNUSED(request);
413 FL_UNUSED(url); // only consumed by FL_WARN, a no-op on small platforms
414 FL_WARN("HTTP fetch is not supported on this platform. URL: " << url);
415 Response error_response(501, "Not Implemented");
416 error_response.set_body("HTTP fetch is not available on this platform.");
417 return fl::task::Promise<Response>::resolve(error_response);
418}
HTTP response class (unified interface)
Definition fetch.h:78
static Promise< T > resolve(const T &value) FL_NO_EXCEPT
Create a resolved Promise with value.
Definition promise.h:67
Definition url.h:15
#define FL_UNUSED(x)
#define FL_WARN(...)
Definition log.h:437

References fl::FL_NO_EXCEPT, FL_UNUSED, FL_WARN, fl::task::Promise< T >::resolve(), and fl::net::http::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: