AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
HttpClient.h
1
6#pragma once
7
8#include <aws/core/Core_EXPORTS.h>
9
10#include <memory>
11#include <atomic>
12#include <mutex>
13#include <condition_variable>
14
15namespace Aws
16{
17 namespace Utils
18 {
19 namespace RateLimits
20 {
21 class RateLimiterInterface;
22 } // namespace RateLimits
23 } // namespace Utils
24
25 namespace Http
26 {
27 class HttpRequest;
28 class HttpResponse;
29
33 class AWS_CORE_API HttpClient
34 {
35 public:
37 virtual ~HttpClient() {}
38
42 virtual std::shared_ptr<HttpResponse> MakeRequest(const std::shared_ptr<HttpRequest>& request,
44 Aws::Utils::RateLimits::RateLimiterInterface* writeLimiter = nullptr) const = 0;
45
49 virtual bool SupportsChunkedTransferEncoding() const { return true; }
50
66 void RetryRequestSleep(std::chrono::milliseconds sleepTime);
67
69
70 explicit operator bool() const
71 {
72 return !m_bad;
73 }
74
75 protected:
76 bool m_bad;
77
78 private:
79
80 std::atomic< bool > m_disableRequestProcessing;
81 std::mutex m_requestProcessingSignalLock;
82 std::condition_variable m_requestProcessingSignal;
83 };
84
85 } // namespace Http
86} // namespace Aws
87
88
void RetryRequestSleep(std::chrono::milliseconds sleepTime)
virtual bool SupportsChunkedTransferEncoding() const
Definition HttpClient.h:49
bool ContinueRequest(const Aws::Http::HttpRequest &) const
bool IsRequestProcessingEnabled() const
virtual std::shared_ptr< HttpResponse > MakeRequest(const std::shared_ptr< HttpRequest > &request, Aws::Utils::RateLimits::RateLimiterInterface *readLimiter=nullptr, Aws::Utils::RateLimits::RateLimiterInterface *writeLimiter=nullptr) const =0