8#include <aws/core/Core_EXPORTS.h>
9#include <aws/core/http/HttpRequest.h>
10#include <aws/core/http/HttpTypes.h>
11#include <aws/core/utils/memory/AWSMemory.h>
12#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
13#include <aws/core/client/CoreErrors.h>
115 switch (responseCode)
143 HttpResponse(
const std::shared_ptr<const HttpRequest>& originatingRequest) :
144 m_httpRequest(originatingRequest),
146 m_hasClientError(false),
147 m_clientErrorType(
Aws::Client::CoreErrors::OK)
160 virtual inline void SetOriginatingRequest(
const std::shared_ptr<const HttpRequest>& httpRequest) { m_httpRequest = httpRequest; }
169 virtual bool HasHeader(
const char* headerName)
const = 0;
223 std::shared_ptr<const HttpRequest> m_httpRequest;
226 bool m_hasClientError;
HttpResponse(const std::shared_ptr< const HttpRequest > &originatingRequest)
virtual ~HttpResponse()=default
virtual void SetContentType(const Aws::String &contentType)
virtual bool HasHeader(const char *headerName) const =0
virtual void SetResponseCode(HttpResponseCode httpResponseCode)
void SetClientErrorType(Aws::Client::CoreErrors errorType)
virtual HeaderValueCollection GetHeaders() const =0
virtual void AddHeader(const Aws::String &headerName, Aws::String &&headerValue)
virtual HttpResponseCode GetResponseCode() const
virtual Aws::IOStream & GetResponseBody() const =0
Aws::Client::CoreErrors GetClientErrorType()
const Aws::String & GetClientErrorMessage() const
virtual const Aws::String & GetHeader(const Aws::String &headerName) const =0
virtual const Aws::String & GetContentType() const
virtual Utils::Stream::ResponseStream && SwapResponseStreamOwnership()=0
bool HasClientError() const
virtual void SetOriginatingRequest(const std::shared_ptr< const HttpRequest > &httpRequest)
virtual const HttpRequest & GetOriginatingRequest() const
void SetClientErrorMessage(const Aws::String &error)
virtual void AddHeader(const Aws::String &, const Aws::String &)=0
@ PROXY_AUTHENTICATION_REQUIRED
@ REQUESTED_RANGE_NOT_SATISFIABLE
@ REQUEST_ENTITY_TOO_LARGE
@ NETWORK_AUTHENTICATION_REQUIRED
@ VARIANT_ALSO_NEGOTIATES
@ REQUEST_HEADER_TOO_LARGE
@ BANDWIDTH_LIMIT_EXCEEDED
@ REQUEST_HEADER_FIELDS_TOO_LARGE
@ CLIENT_CLOSED_TO_REQUEST
@ NON_AUTHORITATIVE_INFORMATION
@ HTTP_VERSION_NOT_SUPPORTED
@ NETWORK_CONNECT_TIMEOUT
bool IsRetryableHttpResponseCode(HttpResponseCode responseCode)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
AWS_CORE_API Aws::OStream & operator<<(Aws::OStream &oStream, HttpResponseCode code)
std::basic_iostream< char, std::char_traits< char > > IOStream
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream