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

#include <HttpRequest.h>

+ Inheritance diagram for Aws::Http::HttpRequest:

Public Member Functions

 HttpRequest (const URI &uri, HttpMethod method)
 
virtual ~HttpRequest ()
 
virtual HeaderValueCollection GetHeaders () const =0
 
virtual const Aws::StringGetHeaderValue (const char *headerName) const =0
 
virtual void SetHeaderValue (const char *headerName, const Aws::String &headerValue)=0
 
virtual void SetHeaderValue (const Aws::String &headerName, const Aws::String &headerValue)=0
 
virtual void DeleteHeader (const char *headerName)=0
 
virtual void AddContentBody (const std::shared_ptr< Aws::IOStream > &strContent)=0
 
virtual const std::shared_ptr< Aws::IOStream > & GetContentBody () const =0
 
virtual bool HasHeader (const char *name) const =0
 
virtual int64_t GetSize () const =0
 
virtual const Aws::IOStreamFactoryGetResponseStreamFactory () const =0
 
virtual void SetResponseStreamFactory (const Aws::IOStreamFactory &factory)=0
 
URIGetUri ()
 
const URIGetUri () const
 
Aws::String GetURIString (bool includeQueryString=true) const
 
HttpMethod GetMethod () const
 
const Aws::StringGetQueryString () const
 
void CanonicalizeRequest ()
 
QueryStringParameterCollection GetQueryStringParameters () const
 
void AddQueryStringParameter (const char *key, const Aws::String &value)
 
bool HasDate () const
 
const Aws::StringGetDate () const
 
void SetDate (const Aws::String &value)
 
bool HasAccept () const
 
const Aws::StringGetAccept () const
 
void SetAccept (const Aws::String &value)
 
bool HasAcceptCharSet () const
 
const Aws::StringGetAcceptCharSet () const
 
void SetAcceptCharSet (const Aws::String &value)
 
bool HasAcceptEncoding () const
 
const Aws::StringGetAcceptEncoding () const
 
void SetAcceptEncoding (const Aws::String &value)
 
bool HasAuthorization () const
 
const Aws::StringGetAuthorization () const
 
void SetAuthorization (const Aws::String &value)
 
bool HasAwsAuthorization () const
 
const Aws::StringGetAwsAuthorization () const
 
void SetAwsAuthorization (const Aws::String &value)
 
bool HasAwsSessionToken () const
 
const Aws::StringGetAwsSessionToken () const
 
void SetAwsSessionToken (const Aws::String &value)
 
bool HasCookie () const
 
const Aws::StringGetCookie () const
 
void SetCookie (const Aws::String &value)
 
bool HasContentLength () const
 
const Aws::StringGetContentLength () const
 
void SetContentLength (const Aws::String &value)
 
bool HasContentType () const
 
const Aws::StringGetContentType () const
 
void SetContentType (const Aws::String &value)
 
bool HasTransferEncoding () const
 
const Aws::StringGetTransferEncoding () const
 
void SetTransferEncoding (const Aws::String &value)
 
bool HasUserAgent () const
 
const Aws::StringGetUserAgent () const
 
void SetUserAgent (const Aws::String &value)
 
bool HasVia () const
 
const Aws::StringGetVia () const
 
void SetVia (const Aws::String &value)
 
bool HasApiVersion () const
 
const Aws::StringGetApiVersion () const
 
void SetApiVersion (const Aws::String &value)
 
void SetDataReceivedEventHandler (const DataReceivedEventHandler &dataReceivedEventHandler)
 
void SetDataReceivedEventHandler (DataReceivedEventHandler &&dataReceivedEventHandler)
 
void SetDataSentEventHandler (const DataSentEventHandler &dataSentEventHandler)
 
void SetDataSentEventHandler (DataSentEventHandler &&dataSentEventHandler)
 
void SetContinueRequestHandle (const ContinueRequestHandler &continueRequestHandler)
 
void SetContinueRequestHandle (ContinueRequestHandler &&continueRequestHandler)
 
const DataReceivedEventHandlerGetDataReceivedEventHandler () const
 
const DataSentEventHandlerGetDataSentEventHandler () const
 
const ContinueRequestHandlerGetContinueRequestHandler () const
 
const Aws::StringGetSigningAccessKey () const
 
void SetSigningAccessKey (const Aws::String &accessKey)
 
const Aws::StringGetSigningRegion () const
 
void SetSigningRegion (const Aws::String &region)
 
virtual void AddRequestMetric (const Aws::String &key, int64_t value)
 
virtual void SetRequestMetrics (const HttpClientMetricsCollection &collection)
 
virtual const HttpClientMetricsCollectionGetRequestMetrics () const
 
Aws::String GetResolvedRemoteHost () const
 
void SetResolvedRemoteHost (const Aws::String &ip)
 

Detailed Description

Abstract class for representing an HttpRequest.

Definition at line 75 of file HttpRequest.h.

Constructor & Destructor Documentation

◆ HttpRequest()

Aws::Http::HttpRequest::HttpRequest ( const URI uri,
HttpMethod  method 
)
inline

Initializes an HttpRequest object with uri and http method.

Definition at line 81 of file HttpRequest.h.

◆ ~HttpRequest()

virtual Aws::Http::HttpRequest::~HttpRequest ( )
inlinevirtual

Definition at line 85 of file HttpRequest.h.

Member Function Documentation

◆ AddContentBody()

virtual void Aws::Http::HttpRequest::AddContentBody ( const std::shared_ptr< Aws::IOStream > &  strContent)
pure virtual

Adds a content body stream to the request. This stream will be used to send the body to the endpoint.

Implemented in Aws::Http::Standard::StandardHttpRequest.

◆ AddQueryStringParameter()

void Aws::Http::HttpRequest::AddQueryStringParameter ( const char *  key,
const Aws::String value 
)
inline

Adds a query string parameter to the underlying URI by key and value.

Definition at line 181 of file HttpRequest.h.

◆ AddRequestMetric()

virtual void Aws::Http::HttpRequest::AddRequestMetric ( const Aws::String key,
int64_t  value 
)
inlinevirtual

Add a request metric

Parameters
key,HttpClientMetricsKeydefined in HttpClientMetrics.cpp
value,thecorresponding value of this key measured during http request.

Definition at line 515 of file HttpRequest.h.

◆ CanonicalizeRequest()

void Aws::Http::HttpRequest::CanonicalizeRequest ( )
inline

Normalizes the URI for use with signing.

Definition at line 167 of file HttpRequest.h.

◆ DeleteHeader()

virtual void Aws::Http::HttpRequest::DeleteHeader ( const char *  headerName)
pure virtual

Deletes a header from the request by name.

Implemented in Aws::Http::Standard::StandardHttpRequest.

◆ GetAccept()

const Aws::String& Aws::Http::HttpRequest::GetAccept ( ) const
inline

Gets accept header.

Definition at line 212 of file HttpRequest.h.

◆ GetAcceptCharSet()

const Aws::String& Aws::Http::HttpRequest::GetAcceptCharSet ( ) const
inline

Gets Accept CharSet header.

Definition at line 231 of file HttpRequest.h.

◆ GetAcceptEncoding()

const Aws::String& Aws::Http::HttpRequest::GetAcceptEncoding ( ) const
inline

Gets accept encoding header.

Definition at line 250 of file HttpRequest.h.

◆ GetApiVersion()

const Aws::String& Aws::Http::HttpRequest::GetApiVersion ( ) const
inline

Gets Api version header x-amz-api-version.

Definition at line 444 of file HttpRequest.h.

◆ GetAuthorization()

const Aws::String& Aws::Http::HttpRequest::GetAuthorization ( ) const
inline

Gets authorization encoding header.

Definition at line 269 of file HttpRequest.h.

◆ GetAwsAuthorization()

const Aws::String& Aws::Http::HttpRequest::GetAwsAuthorization ( ) const
inline

Gets aws authorization header.

Definition at line 288 of file HttpRequest.h.

◆ GetAwsSessionToken()

const Aws::String& Aws::Http::HttpRequest::GetAwsSessionToken ( ) const
inline

Gets session token header.

Definition at line 307 of file HttpRequest.h.

◆ GetContentBody()

virtual const std::shared_ptr<Aws::IOStream>& Aws::Http::HttpRequest::GetContentBody ( ) const
pure virtual

Gets the content body stream that will be used for this request.

Implemented in Aws::Http::Standard::StandardHttpRequest.

◆ GetContentLength()

const Aws::String& Aws::Http::HttpRequest::GetContentLength ( ) const
inline

Gets content-length header.

Definition at line 345 of file HttpRequest.h.

◆ GetContentType()

const Aws::String& Aws::Http::HttpRequest::GetContentType ( ) const
inline

Gets content-type header.

Definition at line 364 of file HttpRequest.h.

◆ GetContinueRequestHandler()

const ContinueRequestHandler& Aws::Http::HttpRequest::GetContinueRequestHandler ( ) const
inline

Definition at line 490 of file HttpRequest.h.

◆ GetCookie()

const Aws::String& Aws::Http::HttpRequest::GetCookie ( ) const
inline

Gets cookie header.

Definition at line 326 of file HttpRequest.h.

◆ GetDataReceivedEventHandler()

const DataReceivedEventHandler& Aws::Http::HttpRequest::GetDataReceivedEventHandler ( ) const
inline

Gets the closure for receiving events when data is received from the server.

Definition at line 484 of file HttpRequest.h.

◆ GetDataSentEventHandler()

const DataSentEventHandler& Aws::Http::HttpRequest::GetDataSentEventHandler ( ) const
inline

Gets the closure for receiving events when data is sent to the server.

Definition at line 488 of file HttpRequest.h.

◆ GetDate()

const Aws::String& Aws::Http::HttpRequest::GetDate ( ) const
inline

Gets date header.

Definition at line 193 of file HttpRequest.h.

◆ GetHeaders()

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

Get All headers for this request.

Implemented in Aws::Http::Standard::StandardHttpRequest.

◆ GetHeaderValue()

virtual const Aws::String& Aws::Http::HttpRequest::GetHeaderValue ( const char *  headerName) const
pure virtual

Get the value for a Header based on its name. (in default StandardHttpRequest implementation, an empty string will be returned if headerName dosen't exist)

Implemented in Aws::Http::Standard::StandardHttpRequest.

◆ GetMethod()

HttpMethod Aws::Http::HttpRequest::GetMethod ( ) const
inline

Get the http method for this request.

Definition at line 153 of file HttpRequest.h.

◆ GetQueryString()

const Aws::String& Aws::Http::HttpRequest::GetQueryString ( ) const
inline

Gets the query string from the URI on this request.

Definition at line 160 of file HttpRequest.h.

◆ GetQueryStringParameters()

QueryStringParameterCollection Aws::Http::HttpRequest::GetQueryStringParameters ( ) const
inline

Gets the query string for the underlying URI as a key value mapping

Definition at line 174 of file HttpRequest.h.

◆ GetRequestMetrics()

virtual const HttpClientMetricsCollection& Aws::Http::HttpRequest::GetRequestMetrics ( ) const
inlinevirtual

Gets the request metrics

Definition at line 525 of file HttpRequest.h.

◆ GetResolvedRemoteHost()

Aws::String Aws::Http::HttpRequest::GetResolvedRemoteHost ( ) const
inline

Returns the IP address of the remote host the request was made out to. This value is populated after the request is made and when the HTTP client supports retrieving such information. If the information is not available, an empty string is returned.

Definition at line 533 of file HttpRequest.h.

◆ GetResponseStreamFactory()

virtual const Aws::IOStreamFactory& Aws::Http::HttpRequest::GetResponseStreamFactory ( ) const
pure virtual

Gets the factory for creating the stream that will be used in the http response.

Implemented in Aws::Http::Standard::StandardHttpRequest.

◆ GetSigningAccessKey()

const Aws::String& Aws::Http::HttpRequest::GetSigningAccessKey ( ) const
inline

Gets the AWS Access Key if this HttpRequest is signed with Aws Access Key

Definition at line 495 of file HttpRequest.h.

◆ GetSigningRegion()

const Aws::String& Aws::Http::HttpRequest::GetSigningRegion ( ) const
inline

Gets the signing region if this request is signed.

Definition at line 504 of file HttpRequest.h.

◆ GetSize()

virtual int64_t Aws::Http::HttpRequest::GetSize ( ) const
pure virtual

Get size in bytes of the request when as it will be going accross the wire.

Implemented in Aws::Http::Standard::StandardHttpRequest.

◆ GetTransferEncoding()

const Aws::String& Aws::Http::HttpRequest::GetTransferEncoding ( ) const
inline

Gets transfer-encoding header.

Definition at line 383 of file HttpRequest.h.

◆ GetUri() [1/2]

URI& Aws::Http::HttpRequest::GetUri ( )
inline

Gets underlying URI object with mutation access.

Definition at line 134 of file HttpRequest.h.

◆ GetUri() [2/2]

const URI& Aws::Http::HttpRequest::GetUri ( ) const
inline

Gets the underlying URI object.

Definition at line 141 of file HttpRequest.h.

◆ GetURIString()

Aws::String Aws::Http::HttpRequest::GetURIString ( bool  includeQueryString = true) const
inline

Converts the URI into a string and returns it. If includeQueryString is set to true, the query string will be included in the returned value.

Definition at line 146 of file HttpRequest.h.

◆ GetUserAgent()

const Aws::String& Aws::Http::HttpRequest::GetUserAgent ( ) const
inline

Gets User Agent header.

Definition at line 402 of file HttpRequest.h.

◆ GetVia()

const Aws::String& Aws::Http::HttpRequest::GetVia ( ) const
inline

Gets via header header.

Definition at line 421 of file HttpRequest.h.

◆ HasAccept()

bool Aws::Http::HttpRequest::HasAccept ( ) const
inline

Definition at line 205 of file HttpRequest.h.

◆ HasAcceptCharSet()

bool Aws::Http::HttpRequest::HasAcceptCharSet ( ) const
inline

Definition at line 224 of file HttpRequest.h.

◆ HasAcceptEncoding()

bool Aws::Http::HttpRequest::HasAcceptEncoding ( ) const
inline

Definition at line 243 of file HttpRequest.h.

◆ HasApiVersion()

bool Aws::Http::HttpRequest::HasApiVersion ( ) const
inline

Has Api version header x-amz-api-version

Definition at line 436 of file HttpRequest.h.

◆ HasAuthorization()

bool Aws::Http::HttpRequest::HasAuthorization ( ) const
inline

Definition at line 262 of file HttpRequest.h.

◆ HasAwsAuthorization()

bool Aws::Http::HttpRequest::HasAwsAuthorization ( ) const
inline

Definition at line 281 of file HttpRequest.h.

◆ HasAwsSessionToken()

bool Aws::Http::HttpRequest::HasAwsSessionToken ( ) const
inline

Definition at line 300 of file HttpRequest.h.

◆ HasContentLength()

bool Aws::Http::HttpRequest::HasContentLength ( ) const
inline

Definition at line 338 of file HttpRequest.h.

◆ HasContentType()

bool Aws::Http::HttpRequest::HasContentType ( ) const
inline

Definition at line 357 of file HttpRequest.h.

◆ HasCookie()

bool Aws::Http::HttpRequest::HasCookie ( ) const
inline

Definition at line 319 of file HttpRequest.h.

◆ HasDate()

bool Aws::Http::HttpRequest::HasDate ( ) const
inline

Definition at line 186 of file HttpRequest.h.

◆ HasHeader()

virtual bool Aws::Http::HttpRequest::HasHeader ( const char *  name) const
pure virtual

Returns true if a header exists in the request with name

Implemented in Aws::Http::Standard::StandardHttpRequest.

◆ HasTransferEncoding()

bool Aws::Http::HttpRequest::HasTransferEncoding ( ) const
inline

Definition at line 376 of file HttpRequest.h.

◆ HasUserAgent()

bool Aws::Http::HttpRequest::HasUserAgent ( ) const
inline

Definition at line 395 of file HttpRequest.h.

◆ HasVia()

bool Aws::Http::HttpRequest::HasVia ( ) const
inline

Definition at line 414 of file HttpRequest.h.

◆ SetAccept()

void Aws::Http::HttpRequest::SetAccept ( const Aws::String value)
inline

Gets accept header.

Definition at line 219 of file HttpRequest.h.

◆ SetAcceptCharSet()

void Aws::Http::HttpRequest::SetAcceptCharSet ( const Aws::String value)
inline

Sets Accept CharSet header.

Definition at line 238 of file HttpRequest.h.

◆ SetAcceptEncoding()

void Aws::Http::HttpRequest::SetAcceptEncoding ( const Aws::String value)
inline

Sets accept encoding header.

Definition at line 257 of file HttpRequest.h.

◆ SetApiVersion()

void Aws::Http::HttpRequest::SetApiVersion ( const Aws::String value)
inline

Sets Api version header x-amz-api-version.

Definition at line 451 of file HttpRequest.h.

◆ SetAuthorization()

void Aws::Http::HttpRequest::SetAuthorization ( const Aws::String value)
inline

Set authorization header.

Definition at line 276 of file HttpRequest.h.

◆ SetAwsAuthorization()

void Aws::Http::HttpRequest::SetAwsAuthorization ( const Aws::String value)
inline

Sets aws authorization header.

Definition at line 295 of file HttpRequest.h.

◆ SetAwsSessionToken()

void Aws::Http::HttpRequest::SetAwsSessionToken ( const Aws::String value)
inline

Sets session token header.

Definition at line 314 of file HttpRequest.h.

◆ SetContentLength()

void Aws::Http::HttpRequest::SetContentLength ( const Aws::String value)
inline

Sets content-length header.

Definition at line 352 of file HttpRequest.h.

◆ SetContentType()

void Aws::Http::HttpRequest::SetContentType ( const Aws::String value)
inline

sets content-type header.

Definition at line 371 of file HttpRequest.h.

◆ SetContinueRequestHandle() [1/2]

void Aws::Http::HttpRequest::SetContinueRequestHandle ( const ContinueRequestHandler continueRequestHandler)
inline

Sets the closure for handling whether or not to cancel a request.

Definition at line 475 of file HttpRequest.h.

◆ SetContinueRequestHandle() [2/2]

void Aws::Http::HttpRequest::SetContinueRequestHandle ( ContinueRequestHandler &&  continueRequestHandler)
inline

Sets the closure for handling whether or not to cancel a request.

Definition at line 479 of file HttpRequest.h.

◆ SetCookie()

void Aws::Http::HttpRequest::SetCookie ( const Aws::String value)
inline

Sets cookie header.

Definition at line 333 of file HttpRequest.h.

◆ SetDataReceivedEventHandler() [1/2]

void Aws::Http::HttpRequest::SetDataReceivedEventHandler ( const DataReceivedEventHandler dataReceivedEventHandler)
inline

Sets the closure for receiving events when data is received from the server.

Definition at line 459 of file HttpRequest.h.

◆ SetDataReceivedEventHandler() [2/2]

void Aws::Http::HttpRequest::SetDataReceivedEventHandler ( DataReceivedEventHandler &&  dataReceivedEventHandler)
inline

Sets the closure for receiving events when data is received from the server.

Definition at line 463 of file HttpRequest.h.

◆ SetDataSentEventHandler() [1/2]

void Aws::Http::HttpRequest::SetDataSentEventHandler ( const DataSentEventHandler dataSentEventHandler)
inline

Sets the closure for receiving events when data is sent to the server.

Definition at line 467 of file HttpRequest.h.

◆ SetDataSentEventHandler() [2/2]

void Aws::Http::HttpRequest::SetDataSentEventHandler ( DataSentEventHandler &&  dataSentEventHandler)
inline

Sets the closure for receiving events when data is sent to the server.

Definition at line 471 of file HttpRequest.h.

◆ SetDate()

void Aws::Http::HttpRequest::SetDate ( const Aws::String value)
inline

Gets date header.

Definition at line 200 of file HttpRequest.h.

◆ SetHeaderValue() [1/2]

virtual void Aws::Http::HttpRequest::SetHeaderValue ( const char *  headerName,
const Aws::String headerValue 
)
pure virtual

Add a header pair

Implemented in Aws::Http::Standard::StandardHttpRequest.

◆ SetHeaderValue() [2/2]

virtual void Aws::Http::HttpRequest::SetHeaderValue ( const Aws::String headerName,
const Aws::String headerValue 
)
pure virtual

Creates a shared_ptr of HttpRequest with uri, method, and closure for how to create a response stream.

Implemented in Aws::Http::Standard::StandardHttpRequest.

◆ SetRequestMetrics()

virtual void Aws::Http::HttpRequest::SetRequestMetrics ( const HttpClientMetricsCollection collection)
inlinevirtual

Sets the request metrics

Definition at line 520 of file HttpRequest.h.

◆ SetResolvedRemoteHost()

void Aws::Http::HttpRequest::SetResolvedRemoteHost ( const Aws::String ip)
inline

Definition at line 534 of file HttpRequest.h.

◆ SetResponseStreamFactory()

virtual void Aws::Http::HttpRequest::SetResponseStreamFactory ( const Aws::IOStreamFactory factory)
pure virtual

Sets the factory for creating the stream that will be used in the http response.

Implemented in Aws::Http::Standard::StandardHttpRequest.

◆ SetSigningAccessKey()

void Aws::Http::HttpRequest::SetSigningAccessKey ( const Aws::String accessKey)
inline

Sets the Aws Access Key if this HttpRequest is signed with Aws Access Key

Definition at line 499 of file HttpRequest.h.

◆ SetSigningRegion()

void Aws::Http::HttpRequest::SetSigningRegion ( const Aws::String region)
inline

Sets the signing region if this request is signed.

Definition at line 508 of file HttpRequest.h.

◆ SetTransferEncoding()

void Aws::Http::HttpRequest::SetTransferEncoding ( const Aws::String value)
inline

Sets transfer-encoding header.

Definition at line 390 of file HttpRequest.h.

◆ SetUserAgent()

void Aws::Http::HttpRequest::SetUserAgent ( const Aws::String value)
inline

Sets User Agent header.

Definition at line 409 of file HttpRequest.h.

◆ SetVia()

void Aws::Http::HttpRequest::SetVia ( const Aws::String value)
inline

Sets via header.

Definition at line 428 of file HttpRequest.h.


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