AWS SDK for C++  0.12.9
AWS SDK for C++
StandardHttpRequest.h
Go to the documentation of this file.
1 /*
2  * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #pragma once
17 
18 #include <aws/core/Core_EXPORTS.h>
23 
24 namespace Aws
25 {
26  namespace Http
27  {
28  namespace Standard
29  {
34  {
35  public:
39  StandardHttpRequest(const URI& uri, HttpMethod method);
40 
44  virtual HeaderValueCollection GetHeaders() const override;
48  virtual const Aws::String& GetHeaderValue(const char* headerName) const override;
52  virtual void SetHeaderValue(const char* headerName, const Aws::String& headerValue) override;
56  virtual void SetHeaderValue(const Aws::String& headerName, const Aws::String& headerValue) override;
60  virtual void DeleteHeader(const char* headerName) override;
64  virtual inline void AddContentBody(const std::shared_ptr<Aws::IOStream>& strContent) override { bodyStream = strContent; }
68  virtual inline const std::shared_ptr<Aws::IOStream>& GetContentBody() const override { return bodyStream; }
72  virtual bool HasHeader(const char*) const override;
76  virtual int64_t GetSize() const override;
80  virtual const Aws::IOStreamFactory& GetResponseStreamFactory() const override;
84  virtual void SetResponseStreamFactory(const Aws::IOStreamFactory& factory) override;
85 
86  private:
87  HeaderValueCollection headerMap;
88  std::shared_ptr<Aws::IOStream> bodyStream;
89  Aws::IOStreamFactory m_responseStreamFactory;
90  };
91 
92  } // namespace Standard
93  } // namespace Http
94 } // namespace Aws
95 
96 
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
virtual const std::shared_ptr< Aws::IOStream > & GetContentBody() const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
virtual void AddContentBody(const std::shared_ptr< Aws::IOStream > &strContent) override
#define AWS_CORE_API
Definition: Core_EXPORTS.h:30
std::function< Aws::IOStream *(void) > IOStreamFactory
Definition: AWSStreamFwd.h:35
JSON (JavaScript Object Notation).