HttpClient.h 471 B

123456789101112131415161718192021222324252627282930
  1. #ifndef HTTPCLIENT_H
  2. #define HTTPCLIENT_H
  3. #include "HttpRequest.h"
  4. #include <memory>
  5. #include <string>
  6. #include <vector>
  7. namespace Http {
  8. class HttpClientImpl;
  9. class HttpClient
  10. {
  11. public:
  12. HttpClient(int timeout = 3, bool debugLogging = false);
  13. ~HttpClient();
  14. HttpClient(const HttpClient&) = delete;
  15. std::string Open(const HttpRequest& request) const;
  16. private:
  17. std::unique_ptr<HttpClientImpl> m_pHttpClientImpl;
  18. };
  19. } // namespace Http
  20. #endif // HTTPCLIENT_H