struct UrlInfo
Parses URL into parts and provides easy access to query parameters.
Example values are based on parsing URL
http://username:password@hostname:9090/path?arg=value&aarg[]=item1&aarg[]=item2#anchor
String url
Original url.
String scheme
URL scheme: http
String host
Host: hostname
String port
Port: 9090
String username
Authentication username: username
String password
Authentication password: password
String path
Path: /path
String query
Query: arg=value&aarg[]=item1&aarg[]=item2
String fragment
Fragment: anchor
VectorMap<String, String> parameters
Scalar query parameters: {"arg": "value"}
VectorMap<String, Vector<String>> array_parameters
Array query parameters: {"aarg": ["item1", "item2"]}
void Clear()
Clears the URL to initial states (everything is empty).
void Parse(const String& url)
Parses url.
String operator[](const char *id) const
Returns value of scalar parameter or empty string if not present.
const Vector<String>& GetArray(const char *id) const
Returns reference to array parameter or reference to empty array if not present.
UrlInfo(const String& url)
Constructs UrlInfo by parsing url.
|