Ada 3.1.0
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
ada::parser Namespace Reference

Includes the definitions for supported parsers. More...

Functions

template<url_pattern_regex::regex_concept regex_provider>
tl::expected< url_pattern< regex_provider >, errorsparse_url_pattern_impl (std::variant< std::string_view, url_pattern_init > input, const std::string_view *base_url, const url_pattern_options *options)
 
template<typename result_type = 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 = 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)
 

Detailed Description

Includes the definitions for supported parsers.

Function Documentation

◆ parse_url()

template<typename result_type = url_aggregator>
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 907 of file parser.cpp.

References parse_url_impl().

◆ parse_url< url >()

template url ada::parser::parse_url< url > ( std::string_view user_input,
const url * base_url )
extern

◆ parse_url< url_aggregator >()

template url_aggregator ada::parser::parse_url< url_aggregator > ( std::string_view user_input,
const url_aggregator * base_url )
extern

◆ parse_url_impl() [1/3]

◆ parse_url_impl() [2/3]

template url ada::parser::parse_url_impl ( std::string_view user_input,
const url * base_url = nullptr )

◆ parse_url_impl() [3/3]

template url_aggregator ada::parser::parse_url_impl ( std::string_view user_input,
const url_aggregator * base_url = nullptr )

◆ parse_url_impl< url >()

template url ada::parser::parse_url_impl< url > ( std::string_view user_input,
const url * base_url )
extern

◆ parse_url_impl< url_aggregator >()

template url_aggregator ada::parser::parse_url_impl< url_aggregator > ( std::string_view user_input,
const url_aggregator * base_url )
extern

◆ parse_url_pattern_impl()

template<url_pattern_regex::regex_concept regex_provider>
tl::expected< url_pattern< regex_provider >, errors > ada::parser::parse_url_pattern_impl ( std::variant< std::string_view, url_pattern_init > input,
const std::string_view * base_url,
const url_pattern_options * options )