Explorar o código

Merge pull request #43241 from Calinou/doc-httprequest-fix-code-sample

Fix a variable being redeclared in the HTTPRequest code sample
Rémi Verschelde %!s(int64=4) %!d(string=hai) anos
pai
achega
7bc74b0fc8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      doc/classes/HTTPRequest.xml

+ 1 - 1
doc/classes/HTTPRequest.xml

@@ -23,7 +23,7 @@
 		    # Note: Don't make simultaneous requests using a single HTTPRequest node.
 		    # The snippet below is provided for reference only.
 		    var body = {"name": "Godette"}
-		    var error = http_request.request("https://httpbin.org/post", [], true, HTTPClient.METHOD_POST, body)
+		    error = http_request.request("https://httpbin.org/post", [], true, HTTPClient.METHOD_POST, body)
 		    if error != OK:
 		        push_error("An error occurred in the HTTP request.")