8#include <aws/core/AmazonWebServiceRequest.h>
9#include <aws/core/client/RequestCompression.h>
10#include <aws/core/http/HttpClient.h>
11#include <aws/core/http/HttpRequest.h>
12#include <smithy/client/common/AwsSmithyClientUtils.h>
26 const std::shared_ptr<Aws::Http::HttpRequest>& httpRequest,
28 const std::shared_ptr<Aws::Http::HttpClient>& httpClient)
33 auto compressOutcome = rc.
compress(pRequest->
GetBody(), compressionAlgorithm);
35 if (compressOutcome.IsSuccess())
38 compressionAlgorithm);
40 compressionAlgorithmId);
42 compressOutcome.GetResult(),
46 SupportsChunkedTransferEncoding());
51 "Failed to compress request, submitting uncompressed");
57 SupportsChunkedTransferEncoding());
virtual std::shared_ptr< Aws::IOStream > GetBody() const =0
virtual bool ShouldComputeContentMd5() const
virtual bool IsStreaming() const
virtual bool IsChunked() const
iostream_outcome compress(std::shared_ptr< Aws::IOStream > input, const CompressionAlgorithm &algorithm) const
static void AddCompressedContentBodyToRequest(const Aws::AmazonWebServiceRequest *pRequest, const std::shared_ptr< Aws::Http::HttpRequest > &httpRequest, const Aws::Client::CompressionAlgorithm &compressionAlgorithm, const std::shared_ptr< Aws::Http::HttpClient > &httpClient)
static void AppendHeaderValueToRequest(const std::shared_ptr< Aws::Http::HttpRequest > &httpRequest, const Aws::String &header, const Aws::String &value)
static void AddContentBodyToRequest(const std::shared_ptr< Aws::Http::HttpRequest > &httpRequest, const std::shared_ptr< Aws::IOStream > &body, const std::shared_ptr< Aws::Http::HttpClient > &httpClient, bool needsContentMd5, bool isChunked)
Aws::String AWS_CORE_API GetCompressionAlgorithmId(const CompressionAlgorithm &algorithm)
AWS_CORE_API const char CONTENT_ENCODING_HEADER[]
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
static const char AWS_CLIENT_REQUEST_COMPRESSION_LOG_TAG[]