AWS SDK for C++

AWS SDK for C++ Version 1.11.788

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
Aws::Http::URI Class Reference

#include <URI.h>

Public Member Functions

 URI ()
 
 URI (const Aws::String &)
 
 URI (const char *)
 
 
URIoperator= (const char *)
 
bool operator== (const URI &) const
 
bool operator== (const Aws::String &) const
 
bool operator== (const char *) const
 
bool operator!= (const URI &) const
 
bool operator!= (const Aws::String &) const
 
bool operator!= (const char *) const
 
Scheme GetScheme () const
 
void SetScheme (Scheme value)
 
const Aws::StringGetAuthority () const
 
void SetAuthority (const Aws::String &value)
 
uint16_t GetPort () const
 
void SetPort (uint16_t value)
 
 
 
 
void SetPath (const Aws::String &value)
 
template<typename T >
void AddPathSegment (T pathSegment)
 
template<typename T >
void AddPathSegments (T pathSegments)
 
const Aws::StringGetQueryString () const
 
void SetQueryString (const Aws::String &str)
 
 
 
 
void AddQueryStringParameter (const char *key, const Aws::String &value)
 
void AddQueryStringParameter (const Aws::Map< Aws::String, Aws::String > &queryStringPairs)
 
Aws::String GetURIString (bool includeQueryString=true) const
 
bool IsRfc3986Encoded () const
 
void SetRfc3986Encoded (const bool value)
 
 

Static Public Member Functions

static Aws::String URLEncodePath (const Aws::String &path)
 
static Aws::String URLEncodePathRFC3986 (const Aws::String &path, bool rfcCompliantEncoding=false)
 

Detailed Description

class modeling universal resource identifier, but implemented for http

Definition at line 37 of file URI.h.

Constructor & Destructor Documentation

◆ URI() [1/3]

Aws::Http::URI::URI ( )

Defaults to http and port 80

◆ URI() [2/3]

Aws::Http::URI::URI ( const Aws::String )

Parses string and sets uri fields

◆ URI() [3/3]

Aws::Http::URI::URI ( const char *  )

Parses string and sets uri fields

Member Function Documentation

◆ AddPathSegment()

template<typename T >
void Aws::Http::URI::AddPathSegment ( pathSegment)
inline

Add a path segment to the uri. Leading slashes and trailing slashes will be removed. Use AddPathSegments() to enable trailing slashes.

Definition at line 123 of file URI.h.

◆ AddPathSegments()

template<typename T >
void Aws::Http::URI::AddPathSegments ( pathSegments)
inline

Add path segments to the uri.

Definition at line 138 of file URI.h.

◆ AddQueryStringParameter() [1/2]

void Aws::Http::URI::AddQueryStringParameter ( const Aws::Map< Aws::String, Aws::String > &  queryStringPairs)

Adds multiple query string parameters to underlying query string.

◆ AddQueryStringParameter() [2/2]

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

Adds query string parameter to underlying query string.

◆ CanonicalizeQueryString()

void Aws::Http::URI::CanonicalizeQueryString ( )

Canonicalizes the query string.

◆ GetAuthority()

const Aws::String & Aws::Http::URI::GetAuthority ( ) const
inline

Gets the authority portion of the URI. Differs from the authority definition in RFC 3986. user information and the port information are not included. It is functionally the host as defined by RFC 3986 with encoding included.

Definition at line 77 of file URI.h.

◆ GetFormParameters()

Aws::String Aws::Http::URI::GetFormParameters ( ) const

◆ GetHost()

Aws::String Aws::Http::URI::GetHost ( ) const

The host portion of the URI as described in rfc3986.

The host subcomponent of authority is identified by an IPv6 literal encapsulated within square brackets, an IPv4 address in dotted- decimal form, or a registered name.

Returns
The host portion of the URI

◆ GetPath()

Aws::String Aws::Http::URI::GetPath ( ) const

Gets the path portion of the uri e.g. the portion after the first slash after the authority and prior to the query string. This is not url encoded.

◆ GetPort()

uint16_t Aws::Http::URI::GetPort ( ) const
inline

Gets the port portion of the uri, defaults to 22 for ftp, 80 for http and 443 for https

Definition at line 88 of file URI.h.

◆ GetQueryString()

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

Gets the raw query string including the ?

Definition at line 162 of file URI.h.

◆ GetQueryStringParameters()

QueryStringParameterCollection Aws::Http::URI::GetQueryStringParameters ( bool  decode = true) const

parses query string and returns url decoded key/value mappings from it. Spaces and all url encoded values will not be encoded.

◆ GetScheme()

Scheme Aws::Http::URI::GetScheme ( ) const
inline

scheme or protocol e.g. http, https, ftp

Definition at line 66 of file URI.h.

◆ GetURIString()

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

Converts the URI to a String usable for its context. e.g. an http request.

◆ GetURLEncodedPath()

Aws::String Aws::Http::URI::GetURLEncodedPath ( ) const

Gets the path portion of the uri, url encodes it and returns it

◆ GetURLEncodedPathRFC3986()

Aws::String Aws::Http::URI::GetURLEncodedPathRFC3986 ( ) const

Gets the path portion of the uri, url encodes it according to RFC3986 and returns it.

◆ IsRfc3986Encoded()

bool Aws::Http::URI::IsRfc3986Encoded ( ) const
inline

Returns true if this URI is going to be encoded in Rfc3986 compliant mode

Definition at line 200 of file URI.h.

◆ operator!=() [1/3]

bool Aws::Http::URI::operator!= ( const Aws::String ) const

◆ operator!=() [2/3]

bool Aws::Http::URI::operator!= ( const char *  ) const

◆ operator!=() [3/3]

bool Aws::Http::URI::operator!= ( const URI ) const

◆ operator=() [1/2]

URI & Aws::Http::URI::operator= ( const Aws::String )

◆ operator=() [2/2]

URI & Aws::Http::URI::operator= ( const char *  )

◆ operator==() [1/3]

bool Aws::Http::URI::operator== ( const Aws::String ) const

◆ operator==() [2/3]

bool Aws::Http::URI::operator== ( const char *  ) const

◆ operator==() [3/3]

bool Aws::Http::URI::operator== ( const URI ) const

◆ SetAuthority()

void Aws::Http::URI::SetAuthority ( const Aws::String value)
inline

Sets the authority portion of the URI. Differs from the authority definition in RFC 3986. user information and the port information are not included. It is functionally the host as defined by RFC 3986 with encoding included.

Definition at line 83 of file URI.h.

◆ SetPath()

void Aws::Http::URI::SetPath ( const Aws::String value)

Sets the path portion of the uri. URL encodes it if needed

◆ SetPort()

void Aws::Http::URI::SetPort ( uint16_t  value)
inline

Sets the port portion of the uri, normally you will not have to do this. If the scheme is set to ftp, http or https then the default ports will be set.

Definition at line 94 of file URI.h.

◆ SetQueryString()

void Aws::Http::URI::SetQueryString ( const Aws::String str)

Resets the query string to the raw string. all query string manipulations made before this call will be lost

◆ SetRfc3986Encoded()

void Aws::Http::URI::SetRfc3986Encoded ( const bool  value)
inline

Sets Rfc3986 compliant encoding mode. False (i.e. use legacy encoding with some chars unescaped) is the default.

Definition at line 205 of file URI.h.

◆ SetScheme()

void Aws::Http::URI::SetScheme ( Scheme  value)

Sets scheme, if the port is incompatible with this scheme, the port will automatically be set as well.

◆ URLEncodePath()

static Aws::String Aws::Http::URI::URLEncodePath ( const Aws::String path)
static

URLEncodes the path portions of path (doesn't encode the "/" portion) Keeps the first and the last "/".

◆ URLEncodePathRFC3986()

static Aws::String Aws::Http::URI::URLEncodePathRFC3986 ( const Aws::String path,
bool  rfcCompliantEncoding = false 
)
static

URLEncodes the path portion of the URI according to RFC3986


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