From 078130bac6d338d8fe55919990dd3dd97f4f6145 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 5 Jan 2020 12:21:58 +0100 Subject: [PATCH] =?UTF-8?q?Change=20argument=20=E2=80=9Cmeth=E2=80=9D=20to?= =?UTF-8?q?=20=E2=80=9Cmethod=E2=80=9D=20in=20make=5Frequest().?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/curl_wrapper.hpp | 7 ++++++- src/curl_wrapper.cpp | 8 +++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/curl_wrapper.hpp b/include/curl_wrapper.hpp index f00388c..77eda31 100644 --- a/include/curl_wrapper.hpp +++ b/include/curl_wrapper.hpp @@ -30,6 +30,11 @@ namespace mastodonpp using std::string; using std::string_view; +/*! + * @brief The HTTP method. + * + * @since 0.1.0 + */ enum class http_method { GET, @@ -91,7 +96,7 @@ public: * @since 0.1.0 */ [[nodiscard]] - answer_type make_request(const http_method &meth, const string_view &uri); + answer_type make_request(const http_method &method, const string_view &uri); private: CURL *_connection; diff --git a/src/curl_wrapper.cpp b/src/curl_wrapper.cpp index 5d04d38..db5ef3f 100644 --- a/src/curl_wrapper.cpp +++ b/src/curl_wrapper.cpp @@ -33,11 +33,13 @@ CURLWrapper::~CURLWrapper() noexcept curl_global_cleanup(); } -answer_type CURLWrapper::make_request(const http_method &meth, - const string_view &uri) +answer_type CURLWrapper::make_request(const http_method &method, + const string_view &uri) { + debuglog << "Making request to: " << uri << '\n'; + CURLcode code; - switch (meth) + switch (method) { case http_method::GET: {