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

◆ fetch_delete()

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

HTTP DELETE request.

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

561 {
562 // Create a new request with DELETE method
563 FetchOptions delete_request(url, RequestOptions("DELETE"));
564
565 // Apply any additional options from the provided request
566 const auto& opts = request.options();
567 delete_request.timeout(opts.timeout_ms);
568 for (const auto& header : opts.headers) {
569 delete_request.header(header.first, header.second);
570 }
571 if (!opts.body.empty()) {
572 delete_request.body(opts.body);
573 }
574
575 return execute_fetch_request(url, delete_request);
576}
const RequestOptions & options() const
Get the options for this request.
Definition fetch.h:236
Fetch options builder (fluent interface)
Definition fetch.h:195
Definition url.h:15
fl::task::Promise< Response > execute_fetch_request(const fl::string &url, const FetchOptions &request)
Internal helper to execute a fetch request and return a promise.
Request options (matches JavaScript fetch RequestInit)
Definition fetch.h:184

References fl::net::http::FetchOptions::body(), execute_fetch_request(), fl::net::http::FetchOptions::header(), fl::net::http::FetchOptions::options(), and fl::net::http::FetchOptions::timeout().

+ Here is the call graph for this function: