URL parser. More...
#include <url.h>
Public Member Functions | |
| url () | |
| Constructor. | |
| url (const std::string &value) | |
| Constructor. | |
| url (const char *value) | |
| Constructor. | |
| void | parse (const std::string &value) |
| Parse the URL. | |
| void | copy_from (const url &u) |
| URL copy. | |
| std::string | get_full_path () const |
| Full path getter. | |
| void | normalize (const std::string &base_path) |
| Normalize the URL. | |
| std::string | encode (const std::string &value) const |
| Encode a URL with escape characters. | |
| std::string | decode (const std::string &value) const |
| Decode a URL from escape characters. | |
| std::string | str () const |
| Reconstruct of a string representation of URL. | |
Public Attributes | |
| std::string | scheme |
| URL scheme - http, https, ftp and so on. | |
| std::string | user |
| Username. | |
| std::string | password |
| Password. | |
| std::string | host |
| Host. | |
| int | port |
| Port number. | |
| std::string | path |
| URL path. | |
| std::string | query |
| URL query. | |
| std::string | fragment |
| URL fragment. | |
| std::string | parameters |
| URL parameters. | |
URL parser.
This class parses Uniform Resource Locator into its parts:
scheme://[user[:password]@]host[:port]/full_path
where full_path is: path[?query][fragment][;parameters]
| dbp::url::url | ( | const std::string & | value | ) |
Constructor.
Splits a given URL into its parts.
| value | a URL to parse |
| dbp::url::url | ( | const char * | value | ) |
Constructor.
Splits a given URL into its parts.
| value | a URL to parse |
| void dbp::url::copy_from | ( | const url & | u | ) |
URL copy.
Copying one URL to another, inheriting missing URL parts.
| void dbp::url::parse | ( | const std::string & | value | ) |
Parse the URL.
Splits a given URL into its parts.
| value | a URL to parse |