MCPcopy Create free account
hub / github.com/FastLED/FastLED / fetch_post

Function fetch_post

src/fl/net/http/fetch.cpp.hpp:527–542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525}
526
527fl::task::Promise<Response> fetch_post(const fl::string& url, const FetchOptions& request) {
528 // Create a new request with POST method
529 FetchOptions post_request(url, RequestOptions("POST"));
530
531 // Apply any additional options from the provided request
532 const auto& opts = request.options();
533 post_request.timeout(opts.timeout_ms);
534 for (const auto& header : opts.headers) {
535 post_request.header(header.first, header.second);
536 }
537 if (!opts.body.empty()) {
538 post_request.body(opts.body);
539 }
540
541 return execute_fetch_request(url, post_request);
542}
543
544fl::task::Promise<Response> fetch_put(const fl::string& url, const FetchOptions& request) {
545 // Create a new request with PUT method

Callers

nothing calls this directly

Calls 4

RequestOptionsClass · 0.85
execute_fetch_requestFunction · 0.85
headerMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected