1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

net.http: add a deprecated attribute for un/escape functions (#12037)

This commit is contained in:
Anton Zavodchikov 2021-10-02 17:19:32 +05:00 committed by GitHub
parent c86935309e
commit 600880660a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -197,22 +197,22 @@ fn build_url_from_fetch(config FetchConfig) ?string {
return url.str() return url.str()
} }
// unescape_url is deprecated, use urllib.query_unescape() instead [deprecated: 'unescape_url is deprecated, use urllib.query_unescape() instead']
pub fn unescape_url(s string) string { pub fn unescape_url(s string) string {
panic('http.unescape_url() was replaced with urllib.query_unescape()') panic('http.unescape_url() was replaced with urllib.query_unescape()')
} }
// escape_url is deprecated, use urllib.query_escape() instead [deprecated: 'escape_url is deprecated, use urllib.query_escape() instead']
pub fn escape_url(s string) string { pub fn escape_url(s string) string {
panic('http.escape_url() was replaced with urllib.query_escape()') panic('http.escape_url() was replaced with urllib.query_escape()')
} }
// unescape is deprecated, use urllib.query_escape() instead [deprecated: 'unescape is deprecated, use urllib.query_escape() instead']
pub fn unescape(s string) string { pub fn unescape(s string) string {
panic('http.unescape() was replaced with http.unescape_url()') panic('http.unescape() was replaced with http.unescape_url()')
} }
// escape is deprecated, use urllib.query_unescape() instead [deprecated: 'escape is deprecated, use urllib.query_unescape() instead']
pub fn escape(s string) string { pub fn escape(s string) string {
panic('http.escape() was replaced with http.escape_url()') panic('http.escape() was replaced with http.escape_url()')
} }