Go to the documentation of this file.
37 #define URI_SCHEME_MAP(XX) \
39 XX(HTTP_SECURE, https, 443) \
40 XX(WEBSOCKET, ws, 80) \
41 XX(WEBSOCKET_SECURE, wss, 443) \
42 XX(MQTT, mqtt, 1883) \
43 XX(MQTT_SECURE, mqtts, 8883) \
45 XX(SMTP_SECURE, smtps, 465) \
47 XX(MAIL_TO, mailto, 0) \
54 #define XX(name, str, port) DECLARE_FSTR(URI_SCHEME_##name)
71 Url(
const Url& url) =
default;
89 const String& path =
nullptr,
const String& query =
nullptr,
const String& fragment =
nullptr)
110 *
this =
String(urlString);
String Password
Definition: Url.h:172
Url & operator=(String urlString)
Copy assignment operator.
String substring(size_t from, size_t to) const
Class to manage URL instance.
Definition: Url.h:66
String getFileName() const
Obtain the filename part of the URL path.
Url(const String &urlString)
Construct a URL object from a regular escaped string.
Definition: Url.h:76
The String class.
Definition: WString.h:136
void debugPrintTo(Print &p) const
Printable output for debugging.
String toString() const
Get escaped URL.
String Host
hostname or IP address
Definition: Url.h:173
String User
Definition: Url.h:171
Url & operator=(const char *urlString)
Copy assignment operator, for C-style strings.
Definition: Url.h:108
Url(const String &scheme, const String &user, const String &password, const String &host, int port=0, const String &path=nullptr, const String &query=nullptr, const String &fragment=nullptr)
Definition: Url.h:88
int Port
Undefined by default.
Definition: Url.h:174
String getRelativePath() const
Get path without leading separator.
Definition: Url.h:147
String toString(const Url &url)
Definition: Url.h:180
Handles the query portion of a URI.
Definition: HttpParams.h:34
void toLowerCase(void)
Convert the entire String content to lower case.
static int getDefaultPort(const String &scheme)
Obtain the default port for a given scheme.
#define URI_SCHEME_MAP(XX)
Definition: Url.h:37
String Scheme
without ":" and "//"
Definition: Url.h:170
HttpParams Query
Definition: Url.h:176
Provides formatted output to stream.
Definition: Print.h:36
#define XX(name, str, port)
Common URI scheme strings.
Definition: Url.h:54
String getPathWithQuery() const
Get path with any query parameters attached.
Url(const char *urlString)
Construct a URL object from a regular null-terminated escaped string.
Definition: Url.h:84
String Path
with leading "/"
Definition: Url.h:175
String getHostWithPort() const
Get hostname+port part of URL string.
int getPort() const
Obtain the actual port number to be used.
Definition: Url.h:133
String Fragment
Without '#'.
Definition: Url.h:177