AWS SDK for C++  1.9.129
AWS SDK for C++
Public Member Functions | List of all members
Aws::Http::HttpResponse Class Referenceabstract

#include <HttpResponse.h>

+ Inheritance diagram for Aws::Http::HttpResponse:

Public Member Functions

 HttpResponse (const std::shared_ptr< const HttpRequest > &originatingRequest)
virtual ~HttpResponse ()=default
virtual const HttpRequestGetOriginatingRequest () const
virtual void SetOriginatingRequest (const std::shared_ptr< const HttpRequest > &httpRequest)
virtual HeaderValueCollection GetHeaders () const =0
virtual bool HasHeader (const char *headerName) const =0
virtual const Aws::StringGetHeader (const Aws::String &headerName) const =0
virtual HttpResponseCode GetResponseCode () const
virtual void SetResponseCode (HttpResponseCode httpResponseCode)
virtual const Aws::StringGetContentType () const
virtual Aws::IOStreamGetResponseBody () const =0
virtual Utils::Stream::ResponseStream && SwapResponseStreamOwnership ()=0
virtual void AddHeader (const Aws::String &, const Aws::String &)=0
virtual void SetContentType (const Aws::String &contentType)
bool HasClientError () const
void SetClientErrorType (Aws::Client::CoreErrors errorType)
Aws::Client::CoreErrors GetClientErrorType ()
const Aws::StringGetClientErrorMessage () const
void SetClientErrorMessage (const Aws::String &error)

Detailed Description

Abstract class for representing an Http Response.

Definition at line 131 of file HttpResponse.h.

Constructor & Destructor Documentation

◆ HttpResponse()

Aws::Http::HttpResponse::HttpResponse ( const std::shared_ptr< const HttpRequest > &  originatingRequest)

Initializes an http response with the originalRequest and the response code.

Definition at line 137 of file HttpResponse.h.

◆ ~HttpResponse()

virtual Aws::Http::HttpResponse::~HttpResponse ( )

Member Function Documentation

◆ AddHeader()

virtual void Aws::Http::HttpResponse::AddHeader ( const Aws::String ,
const Aws::String  
pure virtual

Adds a header to the http response object.

Implemented in Aws::Http::Standard::StandardHttpResponse.

◆ GetClientErrorMessage()

const Aws::String& Aws::Http::HttpResponse::GetClientErrorMessage ( ) const

Definition at line 201 of file HttpResponse.h.

◆ GetClientErrorType()

Aws::Client::CoreErrors Aws::Http::HttpResponse::GetClientErrorType ( )

Definition at line 199 of file HttpResponse.h.

◆ GetContentType()

virtual const Aws::String& Aws::Http::HttpResponse::GetContentType ( ) const

Gets the content-type of the response body

Definition at line 178 of file HttpResponse.h.

◆ GetHeader()

virtual const Aws::String& Aws::Http::HttpResponse::GetHeader ( const Aws::String headerName) const
pure virtual

Returns the value for a header at headerName if it exists.

Implemented in Aws::Http::Standard::StandardHttpResponse.

◆ GetHeaders()

virtual HeaderValueCollection Aws::Http::HttpResponse::GetHeaders ( ) const
pure virtual

Get the headers from this response

Implemented in Aws::Http::Standard::StandardHttpResponse.

◆ GetOriginatingRequest()

virtual const HttpRequest& Aws::Http::HttpResponse::GetOriginatingRequest ( ) const

Gets the request that originated this response

Definition at line 148 of file HttpResponse.h.

◆ GetResponseBody()

virtual Aws::IOStream& Aws::Http::HttpResponse::GetResponseBody ( ) const
pure virtual

Gets the response body of the response.

Implemented in Aws::Http::Standard::StandardHttpResponse.

◆ GetResponseCode()

virtual HttpResponseCode Aws::Http::HttpResponse::GetResponseCode ( ) const

Gets response code for this http response.

Definition at line 170 of file HttpResponse.h.

◆ HasClientError()

bool Aws::Http::HttpResponse::HasClientError ( ) const

Definition at line 197 of file HttpResponse.h.

◆ HasHeader()

virtual bool Aws::Http::HttpResponse::HasHeader ( const char *  headerName) const
pure virtual

Returns true if the response contains a header by headerName

Implemented in Aws::Http::Standard::StandardHttpResponse.

◆ SetClientErrorMessage()

void Aws::Http::HttpResponse::SetClientErrorMessage ( const Aws::String error)

Definition at line 202 of file HttpResponse.h.

◆ SetClientErrorType()

void Aws::Http::HttpResponse::SetClientErrorType ( Aws::Client::CoreErrors  errorType)

Definition at line 198 of file HttpResponse.h.

◆ SetContentType()

virtual void Aws::Http::HttpResponse::SetContentType ( const Aws::String contentType)

Sets the content type header on the http response object.

Definition at line 195 of file HttpResponse.h.

◆ SetOriginatingRequest()

virtual void Aws::Http::HttpResponse::SetOriginatingRequest ( const std::shared_ptr< const HttpRequest > &  httpRequest)

Sets the request that originated this response

Definition at line 153 of file HttpResponse.h.

◆ SetResponseCode()

virtual void Aws::Http::HttpResponse::SetResponseCode ( HttpResponseCode  httpResponseCode)

Sets the response code for this http response.

Definition at line 174 of file HttpResponse.h.

◆ SwapResponseStreamOwnership()

virtual Utils::Stream::ResponseStream&& Aws::Http::HttpResponse::SwapResponseStreamOwnership ( )
pure virtual

Gives full control of the memory of the ResponseBody over to the caller. At this point, it is the caller's responsibility to clean up this object.

Implemented in Aws::Http::Standard::StandardHttpResponse.

The documentation for this class was generated from the following file: