fix(Http): send body content for PATCH, DELETE and OPTIONS methods if exists

while here:
- use CURLOPT_UPLOAD instead of CURLOPT_PUT as the latter is depracated
This commit is contained in:
2023-09-26 23:02:34 +02:00
parent 79e971cb76
commit 5e45ad3417
2 changed files with 18 additions and 9 deletions

View File

@@ -346,7 +346,7 @@ private:
std::string temp_header_value_ascii;
bool fetch_internal(Method method, const char * url, const std::string * in, pt::TextStream & out);
void put_method(Method & method);
void put_method(Method & method, const std::string * in);
static size_t fetch_read_function(char * ptr, size_t size, size_t nmemb, void * userdata);
static int fetch_seek_set(Http * http, curl_off_t offset);
static int fetch_seek_cur(Http * http, curl_off_t offset);