From af4739633415cc80a14c585cdb355ce5d5b49905 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Sun, 13 Aug 2023 18:42:36 -0400 Subject: [PATCH] curl --- include/crowsite/requests/curl.h | 11 ++++++----- src/crowsite/requests/curl.cpp | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/crowsite/requests/curl.h b/include/crowsite/requests/curl.h index 895ee7e..11d6a04 100644 --- a/include/crowsite/requests/curl.h +++ b/include/crowsite/requests/curl.h @@ -8,20 +8,21 @@ #include #include -namespace cs::requests { +namespace cs { void init(); void cleanup(); - class easy_get { + class request { private: CURL* handler = nullptr; struct curl_slist* headers = nullptr; public: - easy_get(); + request(); void setAuthHeader(const std::string& header); - void request(const std::string& domain); - ~easy_get(); + void get(const std::string& domain); + void post(const std::string& domain); + ~easyrequest_get(); }; } diff --git a/src/crowsite/requests/curl.cpp b/src/crowsite/requests/curl.cpp index 2f11c7e..42e0bba 100644 --- a/src/crowsite/requests/curl.cpp +++ b/src/crowsite/requests/curl.cpp @@ -5,7 +5,7 @@ #include #include -namespace cs::requests { +namespace cs { HASHMAP responses;