|
| Uri () |
| Default constructor.
|
|
| Uri () |
| Default constructor.
|
|
| Uri () |
| Default constructor.
|
|
| Uri (const Uri &o) |
| Copy constructor.
|
|
| Uri ( var o) |
| Copy constructor.
|
|
| Uri ( local o) |
| Copy constructor.
|
|
| Uri (Uri &&o) |
| Move constructor.
|
|
| Uri ( var o) |
| Move constructor.
|
|
| Uri ( local o) |
| Move constructor.
|
|
Uri & | operator= (const Uri &o) |
| Copy assignment.
|
|
var | operator= ( var o) |
| Copy assignment.
|
|
local | operator= ( local o) |
| Copy assignment.
|
|
Uri & | operator= (Uri &&o) |
| Move assignment.
|
|
var | operator= ( var o) |
| Move assignment.
|
|
local | operator= ( local o) |
| Move assignment.
|
|
bool | operator== (const Uri &o) const |
| Checks whether two Uri instances contain the same values.
|
|
var | operator== ( var o) |
| Checks whether two Uri instances contain the same values.
|
|
local | operator== ( local o) |
| Checks whether two Uri instances contain the same values.
|
|
bool | isValid () const |
| Checks wether it's a valid URI.
|
|
var | isValid () |
| Checks wether it's a valid URI.
|
|
local | isValid () |
| Checks wether it's a valid URI.
|
|
bool | isSecure () const |
| Checks whether it's a SSL connection.
|
|
var | isSecure () |
| Checks whether it's a SSL connection.
|
|
local | isSecure () |
| Checks whether it's a SSL connection.
|
|
const std::string & | getScheme () const |
| Gets the scheme name for this URI. More...
|
|
var | getScheme () |
| Gets the scheme name for this URI. More...
|
|
local | getScheme () |
| Gets the scheme name for this URI. More...
|
|
const std::string & | getUserName () const |
| Gets the user name with the specified URI. More...
|
|
const std::string & | getPassword () const |
| Gets the password with the specified URI. More...
|
|
const std::string & | getHost () const |
| Get host part of URI. More...
|
|
local | getHost () |
| Get host part of URI. More...
|
|
const std::string & | getHostName () const |
| Get host part of URI. More...
|
|
uint16_t | getPort () const |
| Gets the port number of the URI. More...
|
|
var | getPort () |
| Gets the port number of the URI. More...
|
|
local | getPort () |
| Gets the port number of the URI. More...
|
|
const std::string & | getPath () const |
| Gets the path part of the URI. More...
|
|
const std::string & | getPathEtc () const |
| Gets the path, query and fragment parts of the URI.
|
|
const std::string & | getQuery () const |
| Gets the query part of the URI. More...
|
|
local | getQuery () |
| Gets the query part of the URI. More...
|
|
const std::string & | getFragment () const |
| Gets the fragment part of the URI.
|
|
const std::string & | getAuthority () const |
| Gets the authority part (userName, password, host and port) of the URI. More...
|
|
local | getAuthority () |
| Gets the authority part (userName, password, host and port) of the URI. More...
|
|
std::string | toString () const |
| Gets a string representation of the URI. More...
|
|
var | toString () |
| Gets a string representation of the URI. More...
|
|
local | toString () |
| Gets a string representation of the URI. More...
|
|
const std::vector< std::pair
< std::string, std::string > > & | getQueryParams () |
| Get query parameters as key-value pairs. More...
|
|
local | getQueryParams () |
| Get query parameters as key-value pairs. More...
|
|
void | clear () |
| Clears all parts of the URI. More...
|
|
local | clear () |
| Clears all parts of the URI. More...
|
|
Class representing a URI.
Consider http://www.facebook.com/foo/bar?key=foo#anchor
The URI is broken down into its parts: scheme ("http"), authority (ie. host and port, in most cases: "www.facebook.com"), path ("/foo/bar"), query ("key=foo") and fragment ("anchor"). The scheme is lower-cased.
If this Uri represents a URL, note that, to prevent ambiguity, the component parts are NOT percent-decoded; you should do this yourself with uriUnescape() (for the authority and path) and uriUnescape(..., UriEscapeMode::QUERY) (for the query, but probably only after splitting at '&' to identify the individual parameters).
const std::vector<std::pair
<std::string, std::string>
>& getQueryParams |
( |
| ) |
|
Get query parameters as key-value pairs.
e.g. for URI containing query string: key1=foo&key2=&key3&=bar&=bar= In returned list, there are 3 entries: "key1" => "foo" "key2" => "" "key3" => "" Parts "=bar" and "=bar=" are ignored, as they are not valid query parameters. "=bar" is missing parameter name, while "=bar=" has more than one equal signs, we don't know which one is the delimiter for key and value.
Note, this method is not thread safe, it might update internal state, but only the first call to this method update the state. After the first call is finished, subsequent calls to this method are thread safe.
- Returns
- query parameter key-value pairs in a vector, each element is a pair of which the first element is parameter name and the second one is parameter value
Get query parameters as key-value pairs.
e.g. for URI containing query string: key1=foo&key2=&key3&=bar&=bar= In returned list, there are 3 entries: "key1" => "foo" "key2" => "" "key3" => "" Parts "=bar" and "=bar=" are ignored, as they are not valid query parameters. "=bar" is missing parameter name, while "=bar=" has more than one equal signs, we don't know which one is the delimiter for key and value.
Note, this method is not thread safe, it might update internal state, but only the first call to this method update the state. After the first call is finished, subsequent calls to this method are thread safe.
- Returns
- query parameter key-value pairs in a vector, each element is a pair of which the first element is parameter name and the second one is parameter value
Get query parameters as key-value pairs.
e.g. for URI containing query string: key1=foo&key2=&key3&=bar&=bar= In returned list, there are 3 entries: "key1" => "foo" "key2" => "" "key3" => "" Parts "=bar" and "=bar=" are ignored, as they are not valid query parameters. "=bar" is missing parameter name, while "=bar=" has more than one equal signs, we don't know which one is the delimiter for key and value.
Note, this method is not thread safe, it might update internal state, but only the first call to this method update the state. After the first call is finished, subsequent calls to this method are thread safe.
- Returns
- query parameter key-value pairs in a vector, each element is a pair of which the first element is parameter name and the second one is parameter value