AWS SDK for C++  1.7.243
AWS SDK for C++
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
Aws::Http Namespace Reference

Namespaces

 HttpMethodMapper
 
 SchemeMapper
 
 Standard
 

Classes

class  CurlHandleContainer
 
class  CurlHttpClient
 
class  HttpClient
 
class  HttpClientFactory
 
class  HttpRequest
 
class  HttpResponse
 
class  IXmlHttpRequest2HttpClient
 
class  URI
 
class  WinConnectionPoolMgr
 
class  WinHttpConnectionPoolMgr
 
class  WinHttpSyncHttpClient
 
class  WinINetConnectionPoolMgr
 
class  WinINetSyncHttpClient
 
class  WinSyncHttpClient
 

Typedefs

using PlatformHttpClient = CurlHttpClient
 
typedef std::function< void(const HttpRequest *, HttpResponse *, long long)> DataReceivedEventHandler
 
typedef std::function< void(const HttpRequest *, long long)> DataSentEventHandler
 
typedef std::function< bool(const HttpRequest *)> ContinueRequestHandler
 
typedef std::pair< Aws::String, Aws::StringHeaderValuePair
 
typedef Aws::Map< Aws::String, Aws::StringHeaderValueCollection
 
typedef Aws::MultiMap< Aws::String, Aws::StringQueryStringParameterCollection
 
typedef Microsoft::WRL::ComPtr< IXMLHTTPRequest2 > HttpRequestComHandle
 

Enumerations

enum  HttpResponseCode {
  HttpResponseCode::REQUEST_NOT_MADE = -1, HttpResponseCode::CONTINUE = 100, HttpResponseCode::SWITCHING_PROTOCOLS = 101, HttpResponseCode::PROCESSING = 102,
  HttpResponseCode::OK = 200, HttpResponseCode::CREATED = 201, HttpResponseCode::ACCEPTED = 202, HttpResponseCode::NON_AUTHORITATIVE_INFORMATION = 203,
  HttpResponseCode::NO_CONTENT = 204, HttpResponseCode::RESET_CONTENT = 205, HttpResponseCode::PARTIAL_CONTENT = 206, HttpResponseCode::MULTI_STATUS = 207,
  HttpResponseCode::ALREADY_REPORTED = 208, HttpResponseCode::IM_USED = 226, HttpResponseCode::MULTIPLE_CHOICES = 300, HttpResponseCode::MOVED_PERMANENTLY = 301,
  HttpResponseCode::FOUND = 302, HttpResponseCode::SEE_OTHER = 303, HttpResponseCode::NOT_MODIFIED = 304, HttpResponseCode::USE_PROXY = 305,
  HttpResponseCode::SWITCH_PROXY = 306, HttpResponseCode::TEMPORARY_REDIRECT = 307, HttpResponseCode::PERMANENT_REDIRECT = 308, HttpResponseCode::BAD_REQUEST = 400,
  HttpResponseCode::UNAUTHORIZED = 401, HttpResponseCode::PAYMENT_REQUIRED = 402, HttpResponseCode::FORBIDDEN = 403, HttpResponseCode::NOT_FOUND = 404,
  HttpResponseCode::METHOD_NOT_ALLOWED = 405, HttpResponseCode::NOT_ACCEPTABLE = 406, HttpResponseCode::PROXY_AUTHENTICATION_REQUIRED = 407, HttpResponseCode::REQUEST_TIMEOUT = 408,
  HttpResponseCode::CONFLICT = 409, HttpResponseCode::GONE = 410, HttpResponseCode::LENGTH_REQUIRED = 411, HttpResponseCode::PRECONDITION_FAILED = 412,
  HttpResponseCode::REQUEST_ENTITY_TOO_LARGE = 413, HttpResponseCode::REQUEST_URI_TOO_LONG = 414, HttpResponseCode::UNSUPPORTED_MEDIA_TYPE = 415, HttpResponseCode::REQUESTED_RANGE_NOT_SATISFIABLE = 416,
  HttpResponseCode::EXPECTATION_FAILED = 417, HttpResponseCode::IM_A_TEAPOT = 418, HttpResponseCode::AUTHENTICATION_TIMEOUT = 419, HttpResponseCode::METHOD_FAILURE = 420,
  HttpResponseCode::UNPROC_ENTITY = 422, HttpResponseCode::LOCKED = 423, HttpResponseCode::FAILED_DEPENDENCY = 424, HttpResponseCode::UPGRADE_REQUIRED = 426,
  HttpResponseCode::PRECONDITION_REQUIRED = 427, HttpResponseCode::TOO_MANY_REQUESTS = 429, HttpResponseCode::REQUEST_HEADER_FIELDS_TOO_LARGE = 431, HttpResponseCode::LOGIN_TIMEOUT = 440,
  HttpResponseCode::NO_RESPONSE = 444, HttpResponseCode::RETRY_WITH = 449, HttpResponseCode::BLOCKED = 450, HttpResponseCode::REDIRECT = 451,
  HttpResponseCode::REQUEST_HEADER_TOO_LARGE = 494, HttpResponseCode::CERT_ERROR = 495, HttpResponseCode::NO_CERT = 496, HttpResponseCode::HTTP_TO_HTTPS = 497,
  HttpResponseCode::CLIENT_CLOSED_TO_REQUEST = 499, HttpResponseCode::INTERNAL_SERVER_ERROR = 500, HttpResponseCode::NOT_IMPLEMENTED = 501, HttpResponseCode::BAD_GATEWAY = 502,
  HttpResponseCode::SERVICE_UNAVAILABLE = 503, HttpResponseCode::GATEWAY_TIMEOUT = 504, HttpResponseCode::HTTP_VERSION_NOT_SUPPORTED = 505, HttpResponseCode::VARIANT_ALSO_NEGOTIATES = 506,
  HttpResponseCode::INSUFFICIENT_STORAGE = 506, HttpResponseCode::LOOP_DETECTED = 508, HttpResponseCode::BANDWIDTH_LIMIT_EXCEEDED = 509, HttpResponseCode::NOT_EXTENDED = 510,
  HttpResponseCode::NETWORK_AUTHENTICATION_REQUIRED = 511, HttpResponseCode::NETWORK_READ_TIMEOUT = 598, HttpResponseCode::NETWORK_CONNECT_TIMEOUT = 599
}
 
enum  HttpMethod {
  HttpMethod::HTTP_GET, HttpMethod::HTTP_POST, HttpMethod::HTTP_DELETE, HttpMethod::HTTP_PUT,
  HttpMethod::HTTP_HEAD, HttpMethod::HTTP_PATCH
}
 
enum  TransferLibType { TransferLibType::DEFAULT_CLIENT, TransferLibType::CURL_CLIENT, TransferLibType::WIN_INET_CLIENT, TransferLibType::WIN_HTTP_CLIENT }
 
enum  Scheme { Scheme::HTTP, Scheme::HTTPS }
 

Functions

AWS_CORE_API void SetInitCleanupCurlFlag (bool initCleanupFlag)
 
AWS_CORE_API void SetInstallSigPipeHandlerFlag (bool installHandler)
 
AWS_CORE_API void InitHttp ()
 
AWS_CORE_API void CleanupHttp ()
 
AWS_CORE_API void SetHttpClientFactory (const std::shared_ptr< HttpClientFactory > &factory)
 
AWS_CORE_API std::shared_ptr< HttpClientCreateHttpClient (const Aws::Client::ClientConfiguration &clientConfiguration)
 
AWS_CORE_API std::shared_ptr< HttpRequestCreateHttpRequest (const Aws::String &uri, HttpMethod method, const Aws::IOStreamFactory &streamFactory)
 
AWS_CORE_API std::shared_ptr< HttpRequestCreateHttpRequest (const URI &uri, HttpMethod method, const Aws::IOStreamFactory &streamFactory)
 
bool IsRetryableHttpResponseCode (HttpResponseCode responseCode)
 

Variables

AWS_CORE_API const char DATE_HEADER []
 
AWS_CORE_API const char AWS_DATE_HEADER []
 
AWS_CORE_API const char AWS_SECURITY_TOKEN []
 
AWS_CORE_API const char ACCEPT_HEADER []
 
AWS_CORE_API const char ACCEPT_CHAR_SET_HEADER []
 
AWS_CORE_API const char ACCEPT_ENCODING_HEADER []
 
AWS_CORE_API const char AUTHORIZATION_HEADER []
 
AWS_CORE_API const char AWS_AUTHORIZATION_HEADER []
 
AWS_CORE_API const char COOKIE_HEADER []
 
AWS_CORE_API const char CONTENT_LENGTH_HEADER []
 
AWS_CORE_API const char CONTENT_TYPE_HEADER []
 
AWS_CORE_API const char TRANSFER_ENCODING_HEADER []
 
AWS_CORE_API const char USER_AGENT_HEADER []
 
AWS_CORE_API const char VIA_HEADER []
 
AWS_CORE_API const char HOST_HEADER []
 
AWS_CORE_API const char AMZ_TARGET_HEADER []
 
AWS_CORE_API const char X_AMZ_EXPIRES_HEADER []
 
AWS_CORE_API const char CONTENT_MD5_HEADER []
 
AWS_CORE_API const char API_VERSION_HEADER []
 
AWS_CORE_API const char CHUNKED_VALUE []
 
AWS_CORE_API const char * SEPARATOR
 
static const uint16_t HTTP_DEFAULT_PORT = 80
 
static const uint16_t HTTPS_DEFAULT_PORT = 443
 

Typedef Documentation

◆ ContinueRequestHandler

typedef std::function<bool(const HttpRequest*)> Aws::Http::ContinueRequestHandler

Closure type for handling whether or not a request should be canceled.

Definition at line 70 of file HttpRequest.h.

◆ DataReceivedEventHandler

typedef std::function<void(const HttpRequest*, HttpResponse*, long long)> Aws::Http::DataReceivedEventHandler

closure type for recieving notifications that data has been recieved.

Definition at line 57 of file HttpRequest.h.

◆ DataSentEventHandler

typedef std::function<void(const HttpRequest*, long long)> Aws::Http::DataSentEventHandler

closure type for receiving notifications that data has been sent.

Definition at line 66 of file HttpRequest.h.

◆ HeaderValueCollection

Definition at line 63 of file HttpTypes.h.

◆ HeaderValuePair

Definition at line 62 of file HttpTypes.h.

◆ HttpRequestComHandle

typedef Microsoft::WRL::ComPtr<IXMLHTTPRequest2> Aws::Http::HttpRequestComHandle

Definition at line 31 of file IXmlHttpRequest2HttpClient.h.

◆ PlatformHttpClient

Definition at line 83 of file CurlHttpClient.h.

◆ QueryStringParameterCollection

Definition at line 36 of file URI.h.

Enumeration Type Documentation

◆ HttpMethod

enum Aws::Http::HttpMethod
strong

Models Http methods.

Enumerator
HTTP_GET 
HTTP_POST 
HTTP_DELETE 
HTTP_PUT 
HTTP_HEAD 
HTTP_PATCH 

Definition at line 33 of file HttpTypes.h.

◆ HttpResponseCode

Enum of Http response Codes. The integer values of the response codes correspond to the values in the RFC.

Enumerator
REQUEST_NOT_MADE 
CONTINUE 
SWITCHING_PROTOCOLS 
PROCESSING 
OK 
CREATED 
ACCEPTED 
NON_AUTHORITATIVE_INFORMATION 
NO_CONTENT 
RESET_CONTENT 
PARTIAL_CONTENT 
MULTI_STATUS 
ALREADY_REPORTED 
IM_USED 
MULTIPLE_CHOICES 
MOVED_PERMANENTLY 
FOUND 
SEE_OTHER 
NOT_MODIFIED 
USE_PROXY 
SWITCH_PROXY 
TEMPORARY_REDIRECT 
PERMANENT_REDIRECT 
BAD_REQUEST 
UNAUTHORIZED 
PAYMENT_REQUIRED 
FORBIDDEN 
NOT_FOUND 
METHOD_NOT_ALLOWED 
NOT_ACCEPTABLE 
PROXY_AUTHENTICATION_REQUIRED 
REQUEST_TIMEOUT 
CONFLICT 
GONE 
LENGTH_REQUIRED 
PRECONDITION_FAILED 
REQUEST_ENTITY_TOO_LARGE 
REQUEST_URI_TOO_LONG 
UNSUPPORTED_MEDIA_TYPE 
REQUESTED_RANGE_NOT_SATISFIABLE 
EXPECTATION_FAILED 
IM_A_TEAPOT 
AUTHENTICATION_TIMEOUT 
METHOD_FAILURE 
UNPROC_ENTITY 
LOCKED 
FAILED_DEPENDENCY 
UPGRADE_REQUIRED 
PRECONDITION_REQUIRED 
TOO_MANY_REQUESTS 
REQUEST_HEADER_FIELDS_TOO_LARGE 
LOGIN_TIMEOUT 
NO_RESPONSE 
RETRY_WITH 
BLOCKED 
REDIRECT 
REQUEST_HEADER_TOO_LARGE 
CERT_ERROR 
NO_CERT 
HTTP_TO_HTTPS 
CLIENT_CLOSED_TO_REQUEST 
INTERNAL_SERVER_ERROR 
NOT_IMPLEMENTED 
BAD_GATEWAY 
SERVICE_UNAVAILABLE 
GATEWAY_TIMEOUT 
HTTP_VERSION_NOT_SUPPORTED 
VARIANT_ALSO_NEGOTIATES 
INSUFFICIENT_STORAGE 
LOOP_DETECTED 
BANDWIDTH_LIMIT_EXCEEDED 
NOT_EXTENDED 
NETWORK_AUTHENTICATION_REQUIRED 
NETWORK_READ_TIMEOUT 
NETWORK_CONNECT_TIMEOUT 

Definition at line 38 of file HttpResponse.h.

◆ Scheme

enum Aws::Http::Scheme
strong

Enum representing URI scheme.

Enumerator
HTTP 
HTTPS 

Definition at line 29 of file Scheme.h.

◆ TransferLibType

Possible default http factory vended http client implementations.

Enumerator
DEFAULT_CLIENT 
CURL_CLIENT 
WIN_INET_CLIENT 
WIN_HTTP_CLIENT 

Definition at line 46 of file HttpTypes.h.

Function Documentation

◆ CleanupHttp()

AWS_CORE_API void Aws::Http::CleanupHttp ( )

◆ CreateHttpClient()

AWS_CORE_API std::shared_ptr<HttpClient> Aws::Http::CreateHttpClient ( const Aws::Client::ClientConfiguration clientConfiguration)

◆ CreateHttpRequest() [1/2]

AWS_CORE_API std::shared_ptr<HttpRequest> Aws::Http::CreateHttpRequest ( const Aws::String uri,
HttpMethod  method,
const Aws::IOStreamFactory streamFactory 
)

◆ CreateHttpRequest() [2/2]

AWS_CORE_API std::shared_ptr<HttpRequest> Aws::Http::CreateHttpRequest ( const URI uri,
HttpMethod  method,
const Aws::IOStreamFactory streamFactory 
)

◆ InitHttp()

AWS_CORE_API void Aws::Http::InitHttp ( )

◆ IsRetryableHttpResponseCode()

bool Aws::Http::IsRetryableHttpResponseCode ( HttpResponseCode  responseCode)
inline

Definition at line 117 of file HttpResponse.h.

◆ SetHttpClientFactory()

AWS_CORE_API void Aws::Http::SetHttpClientFactory ( const std::shared_ptr< HttpClientFactory > &  factory)

◆ SetInitCleanupCurlFlag()

AWS_CORE_API void Aws::Http::SetInitCleanupCurlFlag ( bool  initCleanupFlag)

libCurl infects everything with its global state. If it is being used then we automatically initialize and clean it up. If this is a problem for you, set this to false. If you manually initialize libcurl please add the option CURL_GLOBAL_ALL to your init call.

◆ SetInstallSigPipeHandlerFlag()

AWS_CORE_API void Aws::Http::SetInstallSigPipeHandlerFlag ( bool  installHandler)

Variable Documentation

◆ ACCEPT_CHAR_SET_HEADER

AWS_CORE_API const char Aws::Http::ACCEPT_CHAR_SET_HEADER[]

◆ ACCEPT_ENCODING_HEADER

AWS_CORE_API const char Aws::Http::ACCEPT_ENCODING_HEADER[]

◆ ACCEPT_HEADER

AWS_CORE_API const char Aws::Http::ACCEPT_HEADER[]

◆ AMZ_TARGET_HEADER

AWS_CORE_API const char Aws::Http::AMZ_TARGET_HEADER[]

◆ API_VERSION_HEADER

AWS_CORE_API const char Aws::Http::API_VERSION_HEADER[]

◆ AUTHORIZATION_HEADER

AWS_CORE_API const char Aws::Http::AUTHORIZATION_HEADER[]

◆ AWS_AUTHORIZATION_HEADER

AWS_CORE_API const char Aws::Http::AWS_AUTHORIZATION_HEADER[]

◆ AWS_DATE_HEADER

AWS_CORE_API const char Aws::Http::AWS_DATE_HEADER[]

◆ AWS_SECURITY_TOKEN

AWS_CORE_API const char Aws::Http::AWS_SECURITY_TOKEN[]

◆ CHUNKED_VALUE

AWS_CORE_API const char Aws::Http::CHUNKED_VALUE[]

◆ CONTENT_LENGTH_HEADER

AWS_CORE_API const char Aws::Http::CONTENT_LENGTH_HEADER[]

◆ CONTENT_MD5_HEADER

AWS_CORE_API const char Aws::Http::CONTENT_MD5_HEADER[]

◆ CONTENT_TYPE_HEADER

AWS_CORE_API const char Aws::Http::CONTENT_TYPE_HEADER[]

◆ COOKIE_HEADER

AWS_CORE_API const char Aws::Http::COOKIE_HEADER[]

◆ DATE_HEADER

AWS_CORE_API const char Aws::Http::DATE_HEADER[]

◆ HOST_HEADER

AWS_CORE_API const char Aws::Http::HOST_HEADER[]

◆ HTTP_DEFAULT_PORT

const uint16_t Aws::Http::HTTP_DEFAULT_PORT = 80
static

Definition at line 31 of file URI.h.

◆ HTTPS_DEFAULT_PORT

const uint16_t Aws::Http::HTTPS_DEFAULT_PORT = 443
static

Definition at line 32 of file URI.h.

◆ SEPARATOR

AWS_CORE_API const char* Aws::Http::SEPARATOR

◆ TRANSFER_ENCODING_HEADER

AWS_CORE_API const char Aws::Http::TRANSFER_ENCODING_HEADER[]

◆ USER_AGENT_HEADER

AWS_CORE_API const char Aws::Http::USER_AGENT_HEADER[]

◆ VIA_HEADER

AWS_CORE_API const char Aws::Http::VIA_HEADER[]

◆ X_AMZ_EXPIRES_HEADER

AWS_CORE_API const char Aws::Http::X_AMZ_EXPIRES_HEADER[]