diff options
-rw-r--r-- | include/request.hpp | 4 | ||||
-rw-r--r-- | src/request.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/request.hpp b/include/request.hpp index e35b85c..36d4f41 100644 --- a/include/request.hpp +++ b/include/request.hpp @@ -57,7 +57,7 @@ public: * @since 0.1.0 */ [[nodiscard]] - answer_type get(API::endpoint_type endpoint) const; + answer_type get(API::endpoint_type endpoint); /*! * @brief Make a HTTP GET call. @@ -67,7 +67,7 @@ public: * @since 0.1.0 */ [[nodiscard]] - answer_type get(string endpoint) const; + answer_type get(string endpoint); private: Instance &_instance; diff --git a/src/request.cpp b/src/request.cpp index cf2eb39..1e91504 100644 --- a/src/request.cpp +++ b/src/request.cpp @@ -23,17 +23,17 @@ Request::Request(Instance &instance) : _instance{instance} {} -answer_type Request::get(API::endpoint_type endpoint) const +answer_type Request::get(API::endpoint_type endpoint) { answer_type answer; answer.body = API{endpoint}.to_string(); return answer; } -answer_type Request::get(string endpoint) const +answer_type Request::get(string endpoint) { answer_type answer; - answer.body = endpoint; + answer.body = make_request(http_method::GET, "https://ip.tastytea.de/"); return answer; } |