52 friend class std::formatter<
Url>;
57#include <Thoth/Http/Request/Url.tpp>
std::string string
Definition Url.hpp:8
std::string_view string_view
Definition Url.hpp:7
Definition QueryParams.hpp:11
static std::expected< string, RequestError > TryDecode(string_view str)
Tries to decode the text with Percent-Encoding.
string scheme
the given scheme. Can be "http" or "https" (it's "empty" after all).
Definition Url.hpp:12
string host
the hostname of the URL.
Definition Url.hpp:17
bool operator==(const Url &) const
static string Encode(string_view str)
Encodes a text with Percent-Encoding.
static std::expected< Url, RequestError > FromUrl(string_view rawUrl)
Tries to convert the given string into URL.
QueryParams query
the query of the URL.
Definition Url.hpp:23
string user
the userinfo of the URL, the optional part between the scheme and the host. eg: https://userinfo@@loc...
Definition Url.hpp:15
string path
the path of the URL.
Definition Url.hpp:21
string fragment
the fragment of the URL. Normally ignored in server side.
Definition Url.hpp:25
int port
the port of the URL. Goes from 0 to 65.535.
Definition Url.hpp:19
bool IsSecure() const
Check if the scheme is https.