Add support for HTTP method PUT.

This commit is contained in:
tastytea 2020-01-05 16:16:22 +01:00
parent 1bfe3136aa
commit fba5a576f0
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 7 additions and 0 deletions

View File

@ -40,6 +40,7 @@ enum class http_method
GET,
POST,
PATCH,
PUT,
DELETE
};

View File

@ -65,6 +65,12 @@ answer_type CURLWrapper::make_request(const http_method &method,
code = curl_easy_setopt(_connection, CURLOPT_CUSTOMREQUEST, "PATCH");
break;
}
case http_method::PUT:
{
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg)
code = curl_easy_setopt(_connection, CURLOPT_UPLOAD, 1L);
break;
}
case http_method::DELETE:
{
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg)