From a7a861351f6c469bce6b587417a2cc3ac03658fc Mon Sep 17 00:00:00 2001
From: tastytea
Date: Sat, 4 Jan 2020 18:11:24 +0100
Subject: Move low-level network stuff to CURLWrapper.

---
 include/request.hpp | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

(limited to 'include/request.hpp')

diff --git a/include/request.hpp b/include/request.hpp
index dca8327..e35b85c 100644
--- a/include/request.hpp
+++ b/include/request.hpp
@@ -18,6 +18,7 @@
 #define MASTODONPP_REQUEST_HPP
 
 #include "api.hpp"
+#include "curl_wrapper.hpp"
 #include "instance.hpp"
 #include "return_types.hpp"
 
@@ -35,7 +36,7 @@ using std::string;
  *
  *  @headerfile request.hpp mastodonpp/request.hpp
  */
-class Request
+class Request : public CURLWrapper
 {
 public:
     /*!
@@ -50,11 +51,24 @@ public:
     /*!
      *  @brief  Make a HTTP GET call.
      *
+     *  @param endpoint Endpoint as API::endpoint_type, for example:
+     *                  `mastodonpp::API::v1::instance`.
+     *
      *  @since  0.1.0
      */
     [[nodiscard]]
     answer_type get(API::endpoint_type endpoint) const;
 
+    /*!
+     *  @brief  Make a HTTP GET call.
+     *
+     *  @param  endpoint Endpoint as string, for example: "/api/v1/instance".
+     *
+     *  @since  0.1.0
+     */
+    [[nodiscard]]
+    answer_type get(string endpoint) const;
+
 private:
     Instance &_instance;
 };
-- 
cgit v1.2.3-54-g00ecf