| 610 | } |
| 611 | |
| 612 | fl::task::Promise<Response> fetch_patch(const fl::string& url, const FetchOptions& request) { |
| 613 | // Create a new request with PATCH method |
| 614 | FetchOptions patch_request(url, RequestOptions("PATCH")); |
| 615 | |
| 616 | // Apply any additional options from the provided request |
| 617 | const auto& opts = request.options(); |
| 618 | patch_request.timeout(opts.timeout_ms); |
| 619 | for (const auto& header : opts.headers) { |
| 620 | patch_request.header(header.first, header.second); |
| 621 | } |
| 622 | if (!opts.body.empty()) { |
| 623 | patch_request.body(opts.body); |
| 624 | } |
| 625 | |
| 626 | return execute_fetch_request(url, patch_request); |
| 627 | } |
| 628 | |
| 629 | fl::task::Promise<Response> fetch_request(const fl::string& url, const RequestOptions& options) { |
| 630 | // Create a FetchOptions with the provided options |
nothing calls this directly
no test coverage detected