Change argument “meth” to “method” in make_request().

This commit is contained in:
tastytea 2020-01-05 12:21:58 +01:00
parent 07d16594c9
commit 078130bac6
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 11 additions and 4 deletions

View File

@ -30,6 +30,11 @@ namespace mastodonpp
using std::string; using std::string;
using std::string_view; using std::string_view;
/*!
* @brief The HTTP method.
*
* @since 0.1.0
*/
enum class http_method enum class http_method
{ {
GET, GET,
@ -91,7 +96,7 @@ public:
* @since 0.1.0 * @since 0.1.0
*/ */
[[nodiscard]] [[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: private:
CURL *_connection; CURL *_connection;

View File

@ -33,11 +33,13 @@ CURLWrapper::~CURLWrapper() noexcept
curl_global_cleanup(); curl_global_cleanup();
} }
answer_type CURLWrapper::make_request(const http_method &meth, answer_type CURLWrapper::make_request(const http_method &method,
const string_view &uri) const string_view &uri)
{ {
debuglog << "Making request to: " << uri << '\n';
CURLcode code; CURLcode code;
switch (meth) switch (method)
{ {
case http_method::GET: case http_method::GET:
{ {