#pragma once #include #include class CouldNotConnectException : public std::exception { public: CouldNotConnectException() {} virtual ~CouldNotConnectException() throw () {} }; class HTTPClient { public: HTTPClient(); public: void get(const std::string& url, std::ostream& dstStream); void postJson(const std::string& url, std::istream& json, size_t length, std::ostream& dstStream); void postJson(const std::string& url, const std::string& json, std::ostream& dstStream); };