FastLED 3.10.8
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 563 of file fetch.cpp.hpp.

563 {
564 // Create a new request with DELETE method
565 FetchOptions delete_request(url, RequestOptions("DELETE"));
566
567 // Apply any additional options from the provided request
568 const auto& opts = request.options();
569 delete_request.timeout(opts.timeout_ms);
570 for (const auto& header : opts.headers) {
571 delete_request.header(header.first, header.second);
572 }
573 if (!opts.body.empty()) {
574 delete_request.body(opts.body);
575 }
576
577 return execute_fetch_request(url, delete_request);
578}
const RequestOptions & options() const FL_NO_EXCEPT
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) FL_NO_EXCEPT
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::FL_NO_EXCEPT, fl::net::http::FetchOptions::header(), and fl::net::http::FetchOptions::timeout().

+ Here is the call graph for this function: