curl
parent
2c20dc8497
commit
af47396334
|
@ -8,20 +8,21 @@
|
|||
#include <string>
|
||||
#include <curl/curl.h>
|
||||
|
||||
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();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <blt/std/logging.h>
|
||||
#include <blt/std/hashmap.h>
|
||||
|
||||
namespace cs::requests {
|
||||
namespace cs {
|
||||
|
||||
HASHMAP<std::string, std::string> responses;
|
||||
|
||||
|
|
Loading…
Reference in New Issue