#ifndef NETWORK_HPP #define NETWORK_HPP #include #include class Request { public: Request(); ~Request(); std::string get( const std::string &url ); std::string post( const std::string &url, const std::string &data ); void addHeader( const std::string &header ); void clearHeader(); bool initSuccessful(); void setServer( const std::string &server ); int lastResponseCode(); private: CURL *_curl_handle = nullptr; struct curl_slist *_chunk = nullptr; std::string _server; }; #endif