AWS SDK for C++  1.9.107
AWS SDK for C++
CurlHttpClient.h
Go to the documentation of this file.
1 
7 #pragma once
8 
14 #include <atomic>
15 
16 namespace Aws
17 {
18 namespace Http
19 {
20 namespace Standard
21 {
23 }
24 
25 //Curl implementation of an http client. Right now it is only synchronous.
27 {
28 public:
29 
30  using Base = HttpClient;
31 
32  //Creates client, initializes curl handle if it hasn't been created already.
34 
35  //Makes request and receives response synchronously
36  std::shared_ptr<HttpResponse> MakeRequest(const std::shared_ptr<HttpRequest>& request,
37  Aws::Utils::RateLimits::RateLimiterInterface* readLimiter = nullptr,
38  Aws::Utils::RateLimits::RateLimiterInterface* writeLimiter = nullptr) const override;
39 
40  static void InitGlobalState();
41  static void CleanupGlobalState();
42 
43 protected:
48  virtual void OverrideOptionsOnConnectionHandle(CURL*) const {}
49 
50 private:
51  mutable CurlHandleContainer m_curlHandleContainer;
52  bool m_isUsingProxy;
53  Aws::String m_proxyUserName;
54  Aws::String m_proxyPassword;
55  Aws::String m_proxyScheme;
56  Aws::String m_proxyHost;
57  Aws::String m_proxySSLCertPath;
58  Aws::String m_proxySSLCertType;
59  Aws::String m_proxySSLKeyPath;
60  Aws::String m_proxySSLKeyType;
61  Aws::String m_proxyKeyPasswd;
62  unsigned m_proxyPort;
63  Aws::String m_nonProxyHosts;
64  bool m_verifySSL;
65  Aws::String m_caPath;
66  Aws::String m_caFile;
67  bool m_disableExpectHeader;
68  bool m_allowRedirects;
69  static std::atomic<bool> isInit;
70 };
71 
73 
74 } // namespace Http
75 } // namespace Aws
76 
Aws::Http::CurlHttpClient::MakeRequest
std::shared_ptr< HttpResponse > MakeRequest(const std::shared_ptr< HttpRequest > &request, Aws::Utils::RateLimits::RateLimiterInterface *readLimiter=nullptr, Aws::Utils::RateLimits::RateLimiterInterface *writeLimiter=nullptr) const override
Aws::Http::CurlHttpClient::OverrideOptionsOnConnectionHandle
virtual void OverrideOptionsOnConnectionHandle(CURL *) const
Definition: CurlHttpClient.h:48
Aws::Http::CurlHttpClient::InitGlobalState
static void InitGlobalState()
AWS_CORE_API
#define AWS_CORE_API
Definition: Core_EXPORTS.h:25
Aws::Http::CurlHttpClient::CurlHttpClient
CurlHttpClient(const Aws::Client::ClientConfiguration &clientConfig)
CurlHandleContainer.h
Aws::Http::Standard::StandardHttpResponse
Definition: StandardHttpResponse.h:25
Aws::Client::ClientConfiguration
Definition: ClientConfiguration.h:53
Aws::Http::CurlHttpClient::CleanupGlobalState
static void CleanupGlobalState()
AWSString.h
HttpClient.h
Aws::Http::HttpClient
Definition: HttpClient.h:34
Core_EXPORTS.h
ClientConfiguration.h
Aws::Http::CurlHandleContainer
Definition: CurlHandleContainer.h:25
Aws
Definition: AccessManagementClient.h:15
Aws::Utils::RateLimits::RateLimiterInterface
Definition: RateLimiterInterface.h:24
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Http::CurlHttpClient
Definition: CurlHttpClient.h:27