diff options
Diffstat (limited to 'include/curl_wrapper.hpp')
-rw-r--r-- | include/curl_wrapper.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/curl_wrapper.hpp b/include/curl_wrapper.hpp index 5e5b0fa..516af5b 100644 --- a/include/curl_wrapper.hpp +++ b/include/curl_wrapper.hpp @@ -20,11 +20,19 @@ #include "curl/curl.h" #include <string> +#include <string_view> namespace mastodonpp { using std::string; +using std::string_view; + +enum class http_method +{ + GET, + POST +}; /*! * @brief Handles the details of network connections. @@ -70,6 +78,8 @@ public: //! Move assignment operator CURLWrapper& operator=(CURLWrapper &&other) noexcept = default; + string make_request(const http_method &meth, const string_view &uri); + private: CURL *_connection; char _curl_buffer_error[CURL_ERROR_SIZE]; |