generated from duckdb/extension-template
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Open
Description
duckdb-curl-filesystem/src/httpfs_curl_client.cpp
Lines 259 to 293 in a27dd4a
| unique_ptr<HTTPResponse> Delete(DeleteRequestInfo &info) override { | |
| if (state) { | |
| state->delete_count++; | |
| } | |
| auto curl_headers = TransformHeadersCurl(info.headers); | |
| // transform parameters | |
| request_info->url = info.url; | |
| if (!info.params.extra_headers.empty()) { | |
| auto curl_params = TransformParamsCurl(info.params); | |
| request_info->url += "?" + curl_params; | |
| } | |
| CURLcode res; | |
| { | |
| // Set URL | |
| curl_easy_setopt(*curl, CURLOPT_URL, request_info->url.c_str()); | |
| // Set DELETE request method | |
| curl_easy_setopt(*curl, CURLOPT_CUSTOMREQUEST, "DELETE"); | |
| // Follow redirects | |
| curl_easy_setopt(*curl, CURLOPT_FOLLOWLOCATION, 1L); | |
| // Add headers if any | |
| curl_easy_setopt(*curl, CURLOPT_HTTPHEADER, curl_headers ? curl_headers.headers : nullptr); | |
| // Execute DELETE request | |
| res = curl->Execute(); | |
| } | |
| // Get HTTP response status code | |
| curl_easy_getinfo(*curl, CURLINFO_RESPONSE_CODE, &request_info->response_code); | |
| return TransformResponseCurl(res); | |
| } | 
Metadata
Metadata
Assignees
Labels
No labels