curl
parent
2c20dc8497
commit
af47396334
|
@ -8,20 +8,21 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
namespace cs::requests {
|
namespace cs {
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
void cleanup();
|
void cleanup();
|
||||||
|
|
||||||
class easy_get {
|
class request {
|
||||||
private:
|
private:
|
||||||
CURL* handler = nullptr;
|
CURL* handler = nullptr;
|
||||||
struct curl_slist* headers = nullptr;
|
struct curl_slist* headers = nullptr;
|
||||||
public:
|
public:
|
||||||
easy_get();
|
request();
|
||||||
void setAuthHeader(const std::string& header);
|
void setAuthHeader(const std::string& header);
|
||||||
void request(const std::string& domain);
|
void get(const std::string& domain);
|
||||||
~easy_get();
|
void post(const std::string& domain);
|
||||||
|
~easyrequest_get();
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <blt/std/logging.h>
|
#include <blt/std/logging.h>
|
||||||
#include <blt/std/hashmap.h>
|
#include <blt/std/hashmap.h>
|
||||||
|
|
||||||
namespace cs::requests {
|
namespace cs {
|
||||||
|
|
||||||
HASHMAP<std::string, std::string> responses;
|
HASHMAP<std::string, std::string> responses;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue