AWS SDK for C++  1.7.311
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 Aws::Monitoring::HttpClientMetricsCollection &collection)
 
virtual const Aws::Monitoring::HttpClientMetricsCollectionGetRequestMetrics () const
 
Aws::String GetResolvedRemoteHost () const
 
void SetResolvedRemoteHost (const Aws::String &ip)
 

Detailed Description

Abstract class for representing an HttpRequest.

Definition at line 73 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 79 of file HttpRequest.h.

◆ ~HttpRequest()

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

Definition at line 83 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 179 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 513 of file HttpRequest.h.

◆ CanonicalizeRequest()

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

Normalizes the URI for use with signing.

Definition at line 165 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 210 of file HttpRequest.h.

◆ GetAcceptCharSet()

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

Gets Accept CharSet header.

Definition at line 229 of file HttpRequest.h.

◆ GetAcceptEncoding()

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

Gets accept encoding header.

Definition at line 248 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 442 of file HttpRequest.h.

◆ GetAuthorization()

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

Gets authorization encoding header.

Definition at line 267 of file HttpRequest.h.

◆ GetAwsAuthorization()

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

Gets aws authorization header.

Definition at line 286 of file HttpRequest.h.

◆ GetAwsSessionToken()

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

Gets session token header.

Definition at line 305 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 343 of file HttpRequest.h.

◆ GetContentType()

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

Gets content-type header.

Definition at line 362 of file HttpRequest.h.

◆ GetContinueRequestHandler()

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

Definition at line 488 of file HttpRequest.h.

◆ GetCookie()

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

Gets cookie header.

Definition at line 324 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 482 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 486 of file HttpRequest.h.

◆ GetDate()

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

Gets date header.

Definition at line 191 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 doesn'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 151 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 158 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 172 of file HttpRequest.h.

◆ GetRequestMetrics()

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

Gets the request metrics

Definition at line 523 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 531 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 493 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 502 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 381 of file HttpRequest.h.

◆ GetUri() [1/2]

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

Gets underlying URI object with mutation access.

Definition at line 132 of file HttpRequest.h.

◆ GetUri() [2/2]

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

Gets the underlying URI object.

Definition at line 139 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 144 of file HttpRequest.h.

◆ GetUserAgent()

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

Gets User Agent header.

Definition at line 400 of file HttpRequest.h.

◆ GetVia()

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

Gets via header header.

Definition at line 419 of file HttpRequest.h.

◆ HasAccept()

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

Definition at line 203 of file HttpRequest.h.

◆ HasAcceptCharSet()

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

Definition at line 222 of file HttpRequest.h.

◆ HasAcceptEncoding()

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

Definition at line 241 of file HttpRequest.h.

◆ HasApiVersion()

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

Has Api version header x-amz-api-version

Definition at line 434 of file HttpRequest.h.

◆ HasAuthorization()

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

Definition at line 260 of file HttpRequest.h.

◆ HasAwsAuthorization()

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

Definition at line 279 of file HttpRequest.h.

◆ HasAwsSessionToken()

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

Definition at line 298 of file HttpRequest.h.

◆ HasContentLength()

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

Definition at line 336 of file HttpRequest.h.

◆ HasContentType()

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

Definition at line 355 of file HttpRequest.h.

◆ HasCookie()

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

Definition at line 317 of file HttpRequest.h.

◆ HasDate()

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

Definition at line 184 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 374 of file HttpRequest.h.

◆ HasUserAgent()

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

Definition at line 393 of file HttpRequest.h.

◆ HasVia()

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

Definition at line 412 of file HttpRequest.h.

◆ SetAccept()

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

Gets accept header.

Definition at line 217 of file HttpRequest.h.

◆ SetAcceptCharSet()

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

Sets Accept CharSet header.

Definition at line 236 of file HttpRequest.h.

◆ SetAcceptEncoding()

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

Sets accept encoding header.

Definition at line 255 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 449 of file HttpRequest.h.

◆ SetAuthorization()

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

Set authorization header.

Definition at line 274 of file HttpRequest.h.

◆ SetAwsAuthorization()

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

Sets aws authorization header.

Definition at line 293 of file HttpRequest.h.

◆ SetAwsSessionToken()

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

Sets session token header.

Definition at line 312 of file HttpRequest.h.

◆ SetContentLength()

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

Sets content-length header.

Definition at line 350 of file HttpRequest.h.

◆ SetContentType()

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

sets content-type header.

Definition at line 369 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 473 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 477 of file HttpRequest.h.

◆ SetCookie()

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

Sets cookie header.

Definition at line 331 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 457 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 461 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 465 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 469 of file HttpRequest.h.

◆ SetDate()

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

Gets date header.

Definition at line 198 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 Aws::Monitoring::HttpClientMetricsCollection collection)
inlinevirtual

Sets the request metrics

Definition at line 518 of file HttpRequest.h.

◆ SetResolvedRemoteHost()

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

Definition at line 532 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 497 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 506 of file HttpRequest.h.

◆ SetTransferEncoding()

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

Sets transfer-encoding header.

Definition at line 388 of file HttpRequest.h.

◆ SetUserAgent()

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

Sets User Agent header.

Definition at line 407 of file HttpRequest.h.

◆ SetVia()

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

Sets via header.

Definition at line 426 of file HttpRequest.h.


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