|
davix
|
#include <davix_uri.hpp>
Public Member Functions | |
| Uri () | |
| Construct an empty invalid Uri. | |
| Uri (const std::string &uri_string) | |
| construct a new Davix Uri from a string URL | |
| Uri (const Uri &uri) | |
| Copy constructor. | |
| Uri & | operator= (const Uri &orig) |
| assignment operator More... | |
| void | addQueryParam (const std::string &key, const std::string &value) |
| void | addFragmentParam (const std::string &key, const std::string &value) |
| void | addPathSegment (const std::string &seg) |
| void | ensureTrailingSlash () |
| ensure that the path ends with a trailing slash | |
| void | removeTrailingSlash () |
| remove the path's trailing slash, if it exists | |
| bool | queryParamExists (const std::string ¶m) const |
| check if the given query parameter exists | |
| bool | fragmentParamExists (const std::string ¶m) const |
| check if the given fragment parameter exists | |
| const std::string | getFragmentParam (const std::string ¶m) const |
| get the value of a fragment parameter | |
| const std::string & | getString () const |
| int | getPort () const |
| const std::string & | getProtocol () const |
| const std::string & | getHost () const |
| const std::string & | getPath () const |
| void | setPath (const std::string &path) |
| void | setProtocol (const std::string &protocol) |
| void | httpizeProtocol () |
| const std::string & | getUserInfo () const |
| const std::string & | getPathAndQuery () const |
| const std::string & | getFragment () const |
| const std::string & | getQuery () const |
| ParamVec | getQueryVec () const |
| StatusCode::Code | getStatus () const |
| bool | equal (const Uri &u1) const |
| test if two URI are equals More... | |
| bool | operator== (const Uri &u2) const |
| compare oepration More... | |
Static Public Member Functions | |
| static std::string | join (const std::string &left, const std::string &right) |
| Join two paths. More... | |
| static std::string | escapeString (const std::string &str) |
| Escape string. More... | |
| static std::string | unescapeString (const std::string &str) |
| Unescape urI. More... | |
| static std::string | queryParamEscape (const std::string &str) |
| Escape query parameter. More... | |
| static Uri | fromRelativePath (const Uri &uri, const std::string &relPath) |
| create a new Uri from URI and a relative associated path More... | |
Uri parser.
convenience class for uri parsing
| void Davix::Uri::addFragmentParam | ( | const std::string & | key, |
| const std::string & | value | ||
| ) |
append a fragment parameter to the uri
| key | : key |
| value | : value |
| void Davix::Uri::addPathSegment | ( | const std::string & | seg | ) |
append a path segment to the uri
| seg | : the segment to add |
| void Davix::Uri::addQueryParam | ( | const std::string & | key, |
| const std::string & | value | ||
| ) |
append a query parameter to the uri
| key | : parameter key, not escaped |
| value | : parameter value, not escaped |
| bool Davix::Uri::equal | ( | const Uri & | u1 | ) | const |
test if two URI are equals
| u1 |
|
static |
Escape string.
| str | URL to escape |
create a new Uri from URI and a relative associated path
| uri | original URI |
| relPath | relative path |
| const std::string& Davix::Uri::getFragment | ( | ) | const |
get the fragment part of the uri
| const std::string& Davix::Uri::getHost | ( | ) | const |
get the host name
| const std::string& Davix::Uri::getPath | ( | ) | const |
| const std::string& Davix::Uri::getPathAndQuery | ( | ) | const |
get a concatenation of the path and the query argument of the URI
| int Davix::Uri::getPort | ( | ) | const |
get the port number
| const std::string& Davix::Uri::getProtocol | ( | ) | const |
get the protocol scheme
| const std::string& Davix::Uri::getQuery | ( | ) | const |
get the query argument part of the uri
| StatusCode::Code Davix::Uri::getStatus | ( | ) | const |
Status of the Uri see StatusCode::Code
| const std::string& Davix::Uri::getString | ( | ) | const |
get a string representation of the full uri
| const std::string& Davix::Uri::getUserInfo | ( | ) | const |
gextract user information from the URI
|
static |
Join two paths.
| left | URL or filesystem path |
| bool Davix::Uri::operator== | ( | const Uri & | u2 | ) | const |
compare oepration
| u2 |
|
static |
Escape query parameter.
| str | to escape |
|
static |
Unescape urI.
| str | URL to escape |
1.8.17