From 575c04189da2088261b6c3d5921ded948312e568 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Sun, 11 Sep 2022 22:20:02 +0200 Subject: [PATCH] fix(client): allow empty values as params --- src/client/client.v | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/client/client.v b/src/client/client.v index 24e44448..d68ff18f 100644 --- a/src/client/client.v +++ b/src/client/client.v @@ -30,12 +30,10 @@ fn (c &Client) send_request_raw(method Method, url string, params map[string]str // Escape each query param for k, v in params { // An empty parameter should be the same as not providing it at all - if v != '' { - params_escaped[k] = urllib.query_escape(v) - } + params_escaped[k] = urllib.query_escape(v) } - params_str := params_escaped.keys().map('$it=${params[it]}').join('&') + params_str := params_escaped.keys().map('$it=${params_escaped[it]}').join('&') full_url = '$full_url?$params_str' }