diff options
author | tastytea | 2020-01-04 18:11:24 +0100 |
---|---|---|
committer | tastytea | 2020-01-04 18:11:24 +0100 |
commit | a7a861351f6c469bce6b587417a2cc3ac03658fc (patch) | |
tree | 0cbf2a535a568be70f7b0cc12dd258d36ab31433 /include/request.hpp | |
parent | d9c92d52730193ac0e9f3bbf21190d3d1bbb68f8 (diff) | |
download | mastodonpp-a7a861351f6c469bce6b587417a2cc3ac03658fc.tar mastodonpp-a7a861351f6c469bce6b587417a2cc3ac03658fc.tar.gz mastodonpp-a7a861351f6c469bce6b587417a2cc3ac03658fc.zip |
Move low-level network stuff to CURLWrapper.
Diffstat (limited to 'include/request.hpp')
-rw-r--r-- | include/request.hpp | 16 |
1 files changed, 15 insertions, 1 deletions
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; }; |