AWS SDK for C++  1.8.76
AWS SDK for C++
AmazonStreamingWebServiceRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 
9 
16 
17 namespace Aws
18 {
19  static const char* DEFAULT_CONTENT_TYPE = "binary/octet-stream";
20 
26  {
27  public:
31  AmazonStreamingWebServiceRequest() : m_contentType(DEFAULT_CONTENT_TYPE)
32  {
33  }
34 
36 
40  inline std::shared_ptr<Aws::IOStream> GetBody() const override { return m_bodyStream; }
44  inline void SetBody(const std::shared_ptr<Aws::IOStream>& body) { m_bodyStream = body; }
50  {
51  auto headers = GetRequestSpecificHeaders();
52  headers.insert(Aws::Http::HeaderValuePair(Aws::Http::CONTENT_TYPE_HEADER, GetContentType()));
53 
54  return headers;
55  }
56 
60  bool IsStreaming() const override { return true; }
61 
65  const Aws::String& GetContentType() const { return m_contentType; }
69  void SetContentType(const Aws::String& contentType) { m_contentType = contentType; }
70 
71  protected:
76 
77  private:
78  std::shared_ptr<Aws::IOStream> m_bodyStream;
79  Aws::String m_contentType;
80  };
81 
82 } // namespace Aws
83 
Aws::Http::HeaderValueCollection GetHeaders() const override
void SetBody(const std::shared_ptr< Aws::IOStream > &body)
std::shared_ptr< Aws::IOStream > GetBody() const override
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
AWS_CORE_API const char CONTENT_TYPE_HEADER[]
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const
void SetContentType(const Aws::String &contentType)
std::pair< Aws::String, Aws::String > HeaderValuePair
Definition: HttpTypes.h:52
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
static const char * DEFAULT_CONTENT_TYPE
#define AWS_CORE_API
Definition: Core_EXPORTS.h:25