Enforce GDScript and C# dictionary spacing style guidelines in code samples

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Micky <66727710+Mickeon@users.noreply.github.com>
This commit is contained in:
ProgrammerOnCoffee
2025-06-10 10:02:25 -04:00
parent ca1e4785b2
commit 11af23a7a7
6 changed files with 39 additions and 39 deletions
+3 -3
View File
@@ -99,7 +99,7 @@
Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.:
[codeblocks]
[gdscript]
var fields = {"username": "user", "password": "pass"}
var fields = { "username": "user", "password": "pass" }
var query_string = http_client.query_string_from_dict(fields)
# Returns "username=user&amp;password=pass"
[/gdscript]
@@ -112,7 +112,7 @@
Furthermore, if a key has a [code]null[/code] 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.
[codeblocks]
[gdscript]
var fields = {"single": 123, "not_valued": null, "multiple": [22, 33, 44]}
var fields = { "single": 123, "not_valued": null, "multiple": [22, 33, 44] }
var query_string = http_client.query_string_from_dict(fields)
# Returns "single=123&amp;not_valued&amp;multiple=22&amp;multiple=33&amp;multiple=44"
[/gdscript]
@@ -148,7 +148,7 @@
To create a POST request with query strings to push to the server, do:
[codeblocks]
[gdscript]
var fields = {"username" : "user", "password" : "pass"}
var fields = { "username": "user", "password": "pass" }
var query_string = http_client.query_string_from_dict(fields)
var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(query_string.length())]
var result = http_client.request(http_client.METHOD_POST, "/index.php", headers, query_string)