From 3bb40669d5efea707a90171ad2430a81fd4f4726 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 26 Apr 2021 09:33:28 +0200 Subject: [Net] Implement String::parse_url for parsing URLs. Splits the URL into (scheme, host, port, path). Supports both literal IPv4 and IPv6. Strip credentials when present (e.g. http://user:pass@example.com/). Use that function in both HTTPRequest and WebSocketClient. --- core/string/ustring.h | 1 + 1 file changed, 1 insertion(+) (limited to 'core/string/ustring.h') diff --git a/core/string/ustring.h b/core/string/ustring.h index 1e362d7683..a56845deff 100644 --- a/core/string/ustring.h +++ b/core/string/ustring.h @@ -416,6 +416,7 @@ public: String c_unescape() const; String json_escape() const; String word_wrap(int p_chars_per_line) const; + Error parse_url(String &r_scheme, String &r_host, int &r_port, String &r_path) const; String property_name_encode() const; -- cgit v1.2.3