diff options
-rw-r--r-- | include/curl_wrapper.hpp | 4 | ||||
-rw-r--r-- | src/curl_wrapper.cpp | 12 |
2 files changed, 15 insertions, 1 deletions
diff --git a/include/curl_wrapper.hpp b/include/curl_wrapper.hpp index 77eda31..074dccb 100644 --- a/include/curl_wrapper.hpp +++ b/include/curl_wrapper.hpp @@ -38,7 +38,9 @@ using std::string_view; enum class http_method { GET, - POST + POST, + PATCH, + DELETE }; /*! diff --git a/src/curl_wrapper.cpp b/src/curl_wrapper.cpp index 0ff6364..04e9015 100644 --- a/src/curl_wrapper.cpp +++ b/src/curl_wrapper.cpp @@ -59,6 +59,18 @@ answer_type CURLWrapper::make_request(const http_method &method, code = curl_easy_setopt(_connection, CURLOPT_POST, 1L); break; } + case http_method::PATCH: + { + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg) + code = curl_easy_setopt(_connection, CURLOPT_CUSTOMREQUEST, "PATCH"); + break; + } + case http_method::DELETE: + { + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg) + code = curl_easy_setopt(_connection, CURLOPT_CUSTOMREQUEST, "DELETE"); + break; + } } if (code != CURLE_OK) { |