51 std::string username{};
58 std::string password{};
64 std::optional<std::string> host{};
71 std::optional<uint16_t> port{};
84 std::optional<std::string> query{};
92 std::optional<std::string> hash{};
97 [[nodiscard]] inline
bool has_port() const noexcept;
105 [[nodiscard]] std::
string to_string() const override;
119 [[nodiscard]] std::
string get_origin() const noexcept override;
127 [[nodiscard]] std::
string get_protocol() const noexcept;
136 [[nodiscard]] std::
string get_host() const noexcept;
144 [[nodiscard]] std::
string get_hostname() const noexcept;
152 [[nodiscard]] constexpr std::string_view
get_pathname() const noexcept;
167 [[nodiscard]] std::
string get_search() const noexcept;
174 [[nodiscard]] const std::
string &
get_username() const noexcept;
192 bool set_port(std::string_view input);
198 void set_hash(std::string_view input);
216 bool set_host(std::string_view input);
233 bool set_href(std::string_view input);
240 [[nodiscard]] const std::
string &
get_password() const noexcept;
247 [[nodiscard]] std::
string get_port() const noexcept;
254 [[nodiscard]] std::
string get_hash() const noexcept;
286 [[nodiscard]] constexpr
bool has_hash() const noexcept override;
288 [[nodiscard]] constexpr
bool has_search() const noexcept override;
303 inline
void update_unencoded_base_hash(std::string_view input);
304 inline
void update_base_hostname(std::string_view input);
305 inline
void update_base_search(std::string_view input,
306 const uint8_t query_percent_encode_set[]);
307 inline
void update_base_search(std::optional<std::
string> &&input);
308 inline
void update_base_pathname(std::string_view input);
309 inline
void update_base_username(std::string_view input);
310 inline
void update_base_password(std::string_view input);
311 inline
void update_base_port(std::optional<uint16_t> input);
318 template <
bool override_hostname = false>
319 bool set_host_or_hostname(std::string_view input);
325 [[nodiscard]]
bool parse_ipv4(std::string_view input);
331 [[nodiscard]]
bool parse_ipv6(std::string_view input);
337 [[nodiscard]]
bool parse_opaque_host(std::string_view input);
348 std::
string non_special_scheme{};
354 [[nodiscard]]
inline bool cannot_have_credentials_or_port()
const;
357 std::string_view view,
bool check_trailing_content)
noexcept override;
360 return this->parse_port(view,
false);
373 template <
bool has_state_overr
ide = false>
376 constexpr void clear_pathname()
override;
377 constexpr void clear_search()
override;
378 constexpr void set_protocol_as_file();
397 inline void set_scheme(std::string &&new_scheme)
noexcept;
403 constexpr void copy_scheme(
ada::url &&u)
noexcept;
409 constexpr void copy_scheme(
const ada::url &u);
Declarations for URL specific checkers used within Ada.
Common definitions for cross-platform compiler support.
#define ada_really_inline
std::ostream & operator<<(std::ostream &out, const ada::url &u)
Declarations for the URL scheme.
Definitions for the URL serializers.
Base class of URL implementations.
Generic URL struct reliant on std::string instantiation.
void set_hash(std::string_view input)
std::string get_search() const noexcept
bool set_hostname(std::string_view input)
bool set_host(std::string_view input)
ada_really_inline ada::url_components get_components() const noexcept
url(url &&u) noexcept=default
bool has_empty_hostname() const noexcept
bool has_port() const noexcept
ada_really_inline bool has_credentials() const noexcept
friend ada::url ada::parser::parse_url(std::string_view, const ada::url *)
bool set_password(std::string_view input)
url & operator=(url &&u) noexcept=default
url & operator=(const url &u)=default
void set_search(std::string_view input)
ada_really_inline size_t get_pathname_length() const noexcept
bool set_href(std::string_view input)
ada_really_inline std::string get_href() const noexcept
bool has_hostname() const noexcept
bool set_username(std::string_view input)
constexpr std::string_view get_pathname() const noexcept
url(const url &u)=default
std::string get_host() const noexcept
std::string get_hash() const noexcept
bool set_pathname(std::string_view input)
std::string get_origin() const noexcept override
friend void ada::helpers::strip_trailing_spaces_from_opaque_path(ada::url &url) noexcept
std::string get_hostname() const noexcept
friend ada::url ada::parser::parse_url_impl(std::string_view, const ada::url *)
const std::string & get_password() const noexcept
bool set_protocol(std::string_view input)
std::string get_port() const noexcept
const std::string & get_username() const noexcept
bool set_port(std::string_view input)
constexpr bool has_search() const noexcept override
std::string to_string() const override
std::string get_protocol() const noexcept
constexpr bool has_hash() const noexcept override
bool has_valid_domain() const noexcept override
Definitions for all unicode specific functions.
Declaration for the basic URL definitions.
Declaration for the URL Components.