Parse and create URIs according to RFC3986.
More...
#include <uri.h>
Parse and create URIs according to RFC3986.
This class will parse and make the elements of the URI available as members.
Links:
◆ URI() [1/2]
mysqlrouter::URI::URI |
( |
const std::string & |
uri, |
|
|
bool |
allow_path_rootless = true |
|
) |
| |
|
inline |
Default constructor.
Rootless URIs like "mailto:user@example.com" may be forbidden to make sure that simple "host:addr" doesn't get parsed as (scheme='host', path='addr')
- Parameters
-
uri | URI string to decode |
allow_path_rootless | if parsing rootless URIs is allowed. |
◆ URI() [2/2]
mysqlrouter::URI::URI |
( |
| ) |
|
|
inline |
◆ init_from_uri()
void mysqlrouter::URI::init_from_uri |
( |
const std::string & |
uri | ) |
|
|
private |
Sets information using the given URI.
Takes a and parsers out all URI elements.
Throws URIError on errors.
- Parameters
-
◆ operator!=()
◆ operator==()
bool mysqlrouter::URI::operator== |
( |
const URI & |
u2 | ) |
const |
◆ set_uri()
void mysqlrouter::URI::set_uri |
( |
const std::string & |
uri | ) |
|
|
inline |
Sets URI using the given URI string.
- Parameters
-
◆ str()
std::string mysqlrouter::URI::str |
( |
| ) |
const |
return string representation of the URI
◆ allow_path_rootless_
bool mysqlrouter::URI::allow_path_rootless_ |
|
private |
◆ fragment
std::string mysqlrouter::URI::fragment |
Fragment part of the URI.
◆ host
std::string mysqlrouter::URI::host |
Host part found in the Authority.
◆ password
std::string mysqlrouter::URI::password |
Password part found in the Authority.
◆ path
◆ port
uint16_t mysqlrouter::URI::port |
Port found in the Authority.
◆ query
◆ query_delimiter
const char mysqlrouter::URI::query_delimiter = '&' |
|
static |
Delimiter used in the Query part.
◆ scheme
std::string mysqlrouter::URI::scheme |
◆ uri_
std::string mysqlrouter::URI::uri_ |
|
private |
Copy of the original given URI.
◆ username
std::string mysqlrouter::URI::username |
Username part found in the Authority.
The documentation for this class was generated from the following files:
- router/src/router/include/mysqlrouter/uri.h
- router/src/router/src/uri.cc