From 8d8e9d54c859625277c7de977b361165c09b06b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Sat, 17 Mar 2018 13:09:26 +0100 Subject: Enhance HTTPClient.query_string_from_dict() --- doc/classes/HTTPClient.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 5bd7c4cd3e..018b548ef1 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -111,6 +111,12 @@ String queryString = httpClient.query_string_from_dict(fields) returns:= "username=user&password=pass" [/codeblock] + Furthermore, if a key has a null value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added. + [codeblock] + var fields = {"single": 123, "not_valued": null, "multiple": [22, 33, 44]} + String queryString = httpClient.query_string_from_dict(fields) + returns:= "single=123&not_valued&multiple=22&multiple=33&multiple=44" + [/codeblock] -- cgit v1.2.3