Ada 2.9.2
Fast spec-compliant URL parser
|
Includes the definitions for supported parsers. More...
Functions | |
template<typename result_type = ada::url_aggregator> | |
result_type | parse_url (std::string_view user_input, const result_type *base_url=nullptr) |
template url_aggregator | parse_url< url_aggregator > (std::string_view user_input, const url_aggregator *base_url) |
template url | parse_url< url > (std::string_view user_input, const url *base_url) |
template<typename result_type = ada::url_aggregator, bool store_values = true> | |
result_type | parse_url_impl (std::string_view user_input, const result_type *base_url=nullptr) |
template url_aggregator | parse_url_impl< url_aggregator > (std::string_view user_input, const url_aggregator *base_url) |
template url | parse_url_impl< url > (std::string_view user_input, const url *base_url) |
template url | parse_url_impl (std::string_view user_input, const url *base_url=nullptr) |
template url_aggregator | parse_url_impl (std::string_view user_input, const url_aggregator *base_url=nullptr) |
Includes the definitions for supported parsers.
result_type ada::parser::parse_url | ( | std::string_view | user_input, |
const result_type * | base_url = nullptr ) |
Parses a url. The parameter user_input is the input to be parsed: it should be a valid UTF-8 string. The parameter base_url is an optional parameter that can be used to resolve relative URLs. If the base_url is provided, the user_input is resolved against the base_url.
Definition at line 913 of file parser.cpp.
References parse_url_impl().
|
extern |
|
extern |
result_type ada::parser::parse_url_impl | ( | std::string_view | user_input, |
const result_type * | base_url = nullptr ) |
We expect something of the sort... https://user:pass@example.com:1234/foo/bar?baz#quux -----—^
We expect something of the sort... https://user:pass@example.com:1234/foo/bar?baz#quux -----—^
Definition at line 15 of file parser.cpp.
References ADA_ASSERT_TRUE, ada::AUTHORITY, ada::character_sets::C0_CONTROL_PERCENT_ENCODE, ada::scheme::FILE, ada::FILE, ada::FILE_HOST, ada::FILE_SLASH, ada::url::get_hostname(), ada::url::get_href(), ada::url::get_pathname(), ada::url::get_protocol(), ada::url_base::has_opaque_path, ada::HOST, ada::checkers::is_alpha(), ada::checkers::is_normalized_windows_drive_letter(), ada::url_base::is_special(), ada::url_base::is_valid, ada::checkers::is_windows_drive_letter(), ada::NO_SCHEME, ada::OPAQUE_PATH, ada::PATH, ada::PATH_OR_AUTHORITY, ada::PATH_START, ada::PORT, ada::QUERY, ada::character_sets::QUERY_PERCENT_ENCODE, ada::RELATIVE_SCHEME, ada::RELATIVE_SLASH, ada::SCHEME, ada::SCHEME_START, ada::SPECIAL_AUTHORITY_IGNORE_SLASHES, ada::SPECIAL_AUTHORITY_SLASHES, ada::character_sets::SPECIAL_QUERY_PERCENT_ENCODE, ada::SPECIAL_RELATIVE_OR_AUTHORITY, ada::to_string(), ada::unreachable(), and ada::character_sets::USERINFO_PERCENT_ENCODE.
Referenced by ada::can_parse(), ada::parse(), and parse_url().
template url ada::parser::parse_url_impl | ( | std::string_view | user_input, |
const url * | base_url = nullptr ) |
template url_aggregator ada::parser::parse_url_impl | ( | std::string_view | user_input, |
const url_aggregator * | base_url = nullptr ) |
|
extern |
|
extern |