AWS SDK for C++  1.9.1
AWS SDK for C++
StandardHttpResponse.h
Go to the documentation of this file.
1 
6 #pragma once
7 
9 
14 
15 namespace Aws
16 {
17  namespace Http
18  {
19  namespace Standard
20  {
25  {
26  public:
30  StandardHttpResponse(const std::shared_ptr<const HttpRequest>& originatingRequest) :
31  HttpResponse(originatingRequest),
32  bodyStream(originatingRequest->GetResponseStreamFactory())
33  {}
34 
35  ~StandardHttpResponse() = default;
36 
44  bool HasHeader(const char* headerName) const;
48  const Aws::String& GetHeader(const Aws::String&) const;
52  inline Aws::IOStream& GetResponseBody() const { return bodyStream.GetUnderlyingStream(); }
57  inline Utils::Stream::ResponseStream&& SwapResponseStreamOwnership() { return std::move(bodyStream); }
61  void AddHeader(const Aws::String&, const Aws::String&);
62 
63  private:
65 
68  };
69 
70  } // namespace Standard
71  } // namespace Http
72 } // namespace Aws
73 
74 
Aws::Http::Standard::StandardHttpResponse::HasHeader
bool HasHeader(const char *headerName) const
Aws::IOStream
std::basic_iostream< char, std::char_traits< char > > IOStream
Definition: AWSStreamFwd.h:22
Aws::Utils::Stream::ResponseStream
Definition: ResponseStream.h:22
Aws::DirectoryService::Model::DirectoryEdition::NOT_SET
@ NOT_SET
AWS_CORE_API
#define AWS_CORE_API
Definition: Core_EXPORTS.h:25
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::Http::HttpResponse
Definition: HttpResponse.h:132
Aws::Http::Standard::StandardHttpResponse
Definition: StandardHttpResponse.h:25
Aws::Http::Standard::StandardHttpResponse::GetResponseBody
Aws::IOStream & GetResponseBody() const
Definition: StandardHttpResponse.h:52
AWSString.h
HttpResponse.h
Aws::Http::Standard::StandardHttpResponse::AddHeader
void AddHeader(const Aws::String &, const Aws::String &)
Core_EXPORTS.h
Aws
Definition: AccessManagementClient.h:15
Aws::Http::Standard::StandardHttpResponse::StandardHttpResponse
StandardHttpResponse(const std::shared_ptr< const HttpRequest > &originatingRequest)
Definition: StandardHttpResponse.h:30
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Http::Standard::StandardHttpResponse::~StandardHttpResponse
~StandardHttpResponse()=default
Aws::Http::Standard::StandardHttpResponse::SwapResponseStreamOwnership
Utils::Stream::ResponseStream && SwapResponseStreamOwnership()
Definition: StandardHttpResponse.h:57
Aws::Http::Standard::StandardHttpResponse::GetHeaders
HeaderValueCollection GetHeaders() const
ResponseStream.h
AWSMap.h
Aws::Http::Standard::StandardHttpResponse::GetHeader
const Aws::String & GetHeader(const Aws::String &) const
Aws::Map
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19