Uri parser convenience class for uri parsing.
More...
#include <davix_uri.hpp>
Uri parser convenience class for uri parsing.
bool Davix::Uri::equal |
( |
const Uri & |
u1 | ) |
const |
test if two URI are equals
- Parameters
-
- Returns
- true if equal, else false
static std::string Davix::Uri::escapeString |
( |
const std::string & |
str | ) |
|
|
static |
Escape string.
- Parameters
-
- Returns
- encoded string
static Uri Davix::Uri::fromRelativePath |
( |
const Uri & |
uri, |
|
|
const std::string & |
relPath |
|
) |
| |
|
static |
create a new Uri from URI and a relative associated path
- Parameters
-
uri | original URI |
relPath | relative path |
- Returns
- new URI from this path
const std::string& Davix::Uri::getHost |
( |
| ) |
const |
get the host name
- Returns
- return the hostname or an empty string if error
const std::string& Davix::Uri::getPath |
( |
| ) |
const |
get the path part of the Uri
- Returns
- return the path of the Uri or an empty string if error
const std::string& Davix::Uri::getPathAndQuery |
( |
| ) |
const |
get a concatenation of the path and the query argument of the URI
- Returns
- return a path + query arguments concatenation or an empty string if error
int Davix::Uri::getPort |
( |
| ) |
const |
get the port number
- Returns
- return the prot number of 0 if unspecified
const std::string& Davix::Uri::getProtocol |
( |
| ) |
const |
get the protocol scheme
- Returns
- return the protocol scheme or an empty string if error
const std::string& Davix::Uri::getQuery |
( |
| ) |
const |
get the query argument part of the uri
- Returns
- return the query path string or an empty string if not exist or if error
StatusCode::Code Davix::Uri::getStatus |
( |
| ) |
const |
Status of the Uri see StatusCode::Code
- Returns
- StatusCode::OK if success or StatusCode::UriParsingError if error
const std::string& Davix::Uri::getString |
( |
| ) |
const |
get a string representation of the full uri
- Returns
- return the path or an empty string if error
const std::string& Davix::Uri::getUserInfo |
( |
| ) |
const |
gextract user information from the URI
- Returns
- return the path of the Uri or an empty string if error
Uri& Davix::Uri::operator= |
( |
const Uri & |
orig | ) |
|
assignment operator
- Parameters
-
- Returns
bool Davix::Uri::operator== |
( |
const Uri & |
u2 | ) |
const |
compare oepration
- Parameters
-
- Returns
- true if u2 == current uri
static std::string Davix::Uri::unescapeString |
( |
const std::string & |
str | ) |
|
|
static |
Unescape urI.
- Parameters
-
- Returns
- unencoded string
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/davix-0.3.1/include/davix/utils/davix_uri.hpp