From 46101928bdf2022f0da41d16d33451c3d868901b Mon Sep 17 00:00:00 2001 From: Pedro J. Estébanez Date: Sat, 17 Mar 2018 13:09:26 +0100 Subject: Enhance HTTPClient.query_string_from_dict() (cherry picked from commit 8d8e9d54c859625277c7de977b361165c09b06b1) --- doc/classes/HTTPClient.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc/classes') diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 5627f585e..3f0668ba0 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-70-g09d2