Download include/aws/core/http/curl/CurlHttpClient.h from Shenghong/dai_env: direct link, hf CLI and curl.
- Browser
- Download file 2.83 kB
-
https://huggingface.co/Shenghong/dai_env/resolve/main/include/aws/core/http/curl/CurlHttpClient.h
- Command line
-
hf download hf://Shenghong/dai_env/include/aws/core/http/curl/CurlHttpClient.h
-
curl -L -o CurlHttpClient.h https://huggingface.co/Shenghong/dai_env/resolve/main/include/aws/core/http/curl/CurlHttpClient.h
2.83 kB
| /** | |
| * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
| * SPDX-License-Identifier: Apache-2.0. | |
| */ | |
| namespace Aws | |
| { | |
| namespace Http | |
| { | |
| namespace Standard | |
| { | |
| class StandardHttpResponse; | |
| } | |
| //Curl implementation of an http client. Right now it is only synchronous. | |
| class AWS_CORE_API CurlHttpClient: public HttpClient | |
| { | |
| public: | |
| using Base = HttpClient; | |
| //Creates client, initializes curl handle if it hasn't been created already. | |
| CurlHttpClient(const Aws::Client::ClientConfiguration& clientConfig); | |
| //Makes request and receives response synchronously | |
| 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; | |
| static void InitGlobalState(); | |
| static void CleanupGlobalState(); | |
| protected: | |
| /** | |
| * Override any configuration on CURL handle for each request before sending. | |
| * The usage is to have a subclass of CurlHttpClient and have your own implementation of this function to configure whatever you want on CURL handle. | |
| */ | |
| virtual void OverrideOptionsOnConnectionHandle(CURL*) const {} | |
| private: | |
| mutable CurlHandleContainer m_curlHandleContainer; | |
| bool m_isAllowSystemProxy = false; | |
| bool m_isUsingProxy = false; | |
| Aws::String m_proxyUserName; | |
| Aws::String m_proxyPassword; | |
| Aws::String m_proxyScheme; | |
| Aws::String m_proxyHost; | |
| Aws::String m_proxySSLCertPath; | |
| Aws::String m_proxySSLCertType; | |
| Aws::String m_proxySSLKeyPath; | |
| Aws::String m_proxySSLKeyType; | |
| Aws::String m_proxyKeyPasswd; | |
| unsigned m_proxyPort = 0; | |
| Aws::String m_nonProxyHosts; | |
| bool m_verifySSL = true; | |
| Aws::String m_caPath; | |
| Aws::String m_caFile; | |
| Aws::String m_proxyCaPath; | |
| Aws::String m_proxyCaFile; | |
| bool m_disableExpectHeader = false; | |
| bool m_allowRedirects = false; | |
| bool m_enableHttpClientTrace = false; | |
| Aws::Http::TransferLibPerformanceMode m_perfMode = TransferLibPerformanceMode::LOW_LATENCY; | |
| static std::atomic<bool> isInit; | |
| std::shared_ptr<smithy::components::tracing::TelemetryProvider> m_telemetryProvider; | |
| static int CurlProgressCallback(void *userdata, curl_off_t, curl_off_t, curl_off_t, curl_off_t); | |
| static int CurlProgressCallback(void *userdata, double, double, double, double); | |
| }; | |
| using PlatformHttpClient = CurlHttpClient; | |
| } // namespace Http | |
| } // namespace Aws | |