AWS SDK for C++

AWS SDK for C++ Version 1.11.924

Loading...
Searching...
No Matches
Aws::Http Namespace Reference

Namespaces

namespace  HttpMethodMapper
 
namespace  SchemeMapper
 
namespace  Standard
 

Classes

class  ClientStream
 
class  Connection
 
class  CRTHttpClient
 
class  CurlHandleContainer
 
class  CurlHttpClient
 
class  HttpClient
 
class  HttpClientFactory
 
class  HttpRequest
 
class  HttpResponse
 
class  IXmlHttpRequest2HttpClient
 
struct  ServiceSpecificParameters
 
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 *)> HeadersReceivedEventHandler
 
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::String > HeaderValuePair
 
typedef Aws::Map< Aws::String, Aws::String > HeaderValueCollection
 
typedef Aws::MultiMap< Aws::String, Aws::String > QueryStringParameterCollection
 
typedef Microsoft::WRL::ComPtr< IXMLHTTPRequest2 > HttpRequestComHandle
 

Enumerations

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

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< HttpClient > CreateHttpClient (const Aws::Client::ClientConfiguration &clientConfiguration)
 
AWS_CORE_API std::shared_ptr< HttpRequest > CreateHttpRequest (const Aws::String &uri, HttpMethod method, const Aws::IOStreamFactory &streamFactory)
 
AWS_CORE_API std::shared_ptr< HttpRequest > CreateHttpRequest (const URI &uri, HttpMethod method, const Aws::IOStreamFactory &streamFactory)
 
AWS_CORE_API Aws::OStream & operator<< (Aws::OStream &oStream, HttpResponseCode code)
 
bool IsRetryableHttpResponseCode (HttpResponseCode responseCode)
 
AWS_CORE_API void SetCompliantRfc3986Encoding (bool compliant)
 
AWS_CORE_API void SetPreservePathSeparators (bool preservePathSeparators)
 

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 DECODED_CONTENT_LENGTH_HEADER []
 
AWS_CORE_API const char CONTENT_LENGTH_HEADER []
 
AWS_CORE_API const char CONTENT_TYPE_HEADER []
 
AWS_CORE_API const char CONTENT_ENCODING_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 AWS_TRAILER_HEADER []
 
AWS_CORE_API const char SDK_INVOCATION_ID_HEADER []
 
AWS_CORE_API const char SDK_REQUEST_HEADER []
 
AWS_CORE_API const char SMITHY_PROTOCOL_HEADER []
 
AWS_CORE_API const char X_AMZN_TRACE_ID_HEADER []
 
AWS_CORE_API const char CHUNKED_VALUE []
 
AWS_CORE_API const char AWS_CHUNKED_VALUE []
 
AWS_CORE_API const char EXPECT_HEADER []
 
AWS_CORE_API const char EXPECT_100_CONTINUE_VALUE []
 
AWS_CORE_API const char X_AMZN_ERROR_TYPE []
 
AWS_CORE_API const char X_AMZN_QUERY_MODE []
 
AWS_CORE_API const char * SEPARATOR
 
static const uint16_t HTTP_DEFAULT_PORT = 80
 
static const uint16_t HTTPS_DEFAULT_PORT = 443
 
bool s_compliantRfc3986Encoding
 
AWS_CORE_API bool s_preservePathSeparators
 

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 91 of file HttpRequest.h.

◆ DataReceivedEventHandler

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

closure type for receiving notifications that data has been received.

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

◆ HeadersReceivedEventHandler

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

closure type for receiving notifications that headers have been received.

Definition at line 79 of file HttpRequest.h.

◆ HeaderValueCollection

◆ HeaderValuePair

Definition at line 55 of file HttpTypes.h.

◆ HttpRequestComHandle

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

Definition at line 21 of file IXmlHttpRequest2HttpClient.h.

◆ PlatformHttpClient

Definition at line 86 of file CurlHttpClient.h.

◆ QueryStringParameterCollection

Enumeration Type Documentation

◆ HttpMethod

enum class Aws::Http::HttpMethod
strong

Models Http methods.

Enumerator
HTTP_GET 
HTTP_POST 
HTTP_DELETE 
HTTP_PUT 
HTTP_HEAD 
HTTP_PATCH 
HTTP_CONNECT 
HTTP_OPTIONS 
HTTP_TRACE 

Definition at line 23 of file HttpTypes.h.

◆ HttpResponseCode

enum class Aws::Http::HttpResponseCode
strong

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 29 of file HttpResponse.h.

◆ Scheme

enum class Aws::Http::Scheme
strong

Enum representing URI scheme.

Enumerator
HTTP 
HTTPS 

Definition at line 19 of file Scheme.h.

◆ TransferLibPerformanceMode

Configuration for a HTTP client, currently used only by libCurl

Enumerator
LOW_LATENCY 
REGULAR 

Definition at line 43 of file HttpTypes.h.

◆ TransferLibType

enum class Aws::Http::TransferLibType
strong

Possible default http factory vended http client implementations.

Enumerator
DEFAULT_CLIENT 
CURL_CLIENT 
WIN_INET_CLIENT 
WIN_HTTP_CLIENT 

Definition at line 38 of file HttpTypes.h.

◆ Version

enum class Aws::Http::Version
strong

Enum to represent version of the http protocol to use

Enumerator
HTTP_VERSION_NONE 
HTTP_VERSION_1_0 
HTTP_VERSION_1_1 
HTTP_VERSION_2_0 
HTTP_VERSION_2TLS 
HTTP_VERSION_2_PRIOR_KNOWLEDGE 
HTTP_VERSION_3 
HTTP_VERSION_3ONLY 

Definition at line 22 of file Version.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 113 of file HttpResponse.h.

◆ operator<<()

AWS_CORE_API Aws::OStream & Aws::Http::operator<< ( Aws::OStream & oStream,
HttpResponseCode code )

Overload ostream operator<< for HttpResponseCode enum class for a prettier output such as "200"

◆ SetCompliantRfc3986Encoding()

AWS_CORE_API void Aws::Http::SetCompliantRfc3986Encoding ( bool compliant)

◆ 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)

◆ SetPreservePathSeparators()

AWS_CORE_API void Aws::Http::SetPreservePathSeparators ( bool preservePathSeparators)

Variable Documentation

◆ ACCEPT_CHAR_SET_HEADER

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

◆ ACCEPT_ENCODING_HEADER

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

◆ ACCEPT_HEADER

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

◆ AMZ_TARGET_HEADER

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

◆ API_VERSION_HEADER

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

◆ AUTHORIZATION_HEADER

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

◆ AWS_AUTHORIZATION_HEADER

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

◆ AWS_CHUNKED_VALUE

AWS_CORE_API const char Aws::Http::AWS_CHUNKED_VALUE[]
extern

◆ AWS_DATE_HEADER

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

◆ AWS_SECURITY_TOKEN

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

◆ AWS_TRAILER_HEADER

AWS_CORE_API const char Aws::Http::AWS_TRAILER_HEADER[]
extern

◆ CHUNKED_VALUE

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

◆ CONTENT_ENCODING_HEADER

AWS_CORE_API const char Aws::Http::CONTENT_ENCODING_HEADER[]
extern

◆ CONTENT_LENGTH_HEADER

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

◆ CONTENT_MD5_HEADER

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

◆ CONTENT_TYPE_HEADER

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

◆ COOKIE_HEADER

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

◆ DATE_HEADER

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

◆ DECODED_CONTENT_LENGTH_HEADER

AWS_CORE_API const char Aws::Http::DECODED_CONTENT_LENGTH_HEADER[]
extern

◆ EXPECT_100_CONTINUE_VALUE

AWS_CORE_API const char Aws::Http::EXPECT_100_CONTINUE_VALUE[]
extern

◆ EXPECT_HEADER

AWS_CORE_API const char Aws::Http::EXPECT_HEADER[]
extern

◆ HOST_HEADER

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

◆ HTTP_DEFAULT_PORT

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

Definition at line 21 of file URI.h.

◆ HTTPS_DEFAULT_PORT

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

Definition at line 22 of file URI.h.

◆ s_compliantRfc3986Encoding

bool Aws::Http::s_compliantRfc3986Encoding
extern

◆ s_preservePathSeparators

AWS_CORE_API bool Aws::Http::s_preservePathSeparators
extern

◆ SDK_INVOCATION_ID_HEADER

AWS_CORE_API const char Aws::Http::SDK_INVOCATION_ID_HEADER[]
extern

◆ SDK_REQUEST_HEADER

AWS_CORE_API const char Aws::Http::SDK_REQUEST_HEADER[]
extern

◆ SEPARATOR

AWS_CORE_API const char* Aws::Http::SEPARATOR
extern

◆ SMITHY_PROTOCOL_HEADER

AWS_CORE_API const char Aws::Http::SMITHY_PROTOCOL_HEADER[]
extern

◆ TRANSFER_ENCODING_HEADER

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

◆ USER_AGENT_HEADER

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

◆ VIA_HEADER

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

◆ X_AMZ_EXPIRES_HEADER

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

◆ X_AMZN_ERROR_TYPE

AWS_CORE_API const char Aws::Http::X_AMZN_ERROR_TYPE[]
extern

◆ X_AMZN_QUERY_MODE

AWS_CORE_API const char Aws::Http::X_AMZN_QUERY_MODE[]
extern

◆ X_AMZN_TRACE_ID_HEADER

AWS_CORE_API const char Aws::Http::X_AMZN_TRACE_ID_HEADER[]
extern