Przeglądaj źródła

Fix a variable being redeclared in the HTTPRequest code sample

(cherry picked from commit d7025c41679554d131243793a89eba77f52e51e5)
Hugo Locurcio 5 lat temu
rodzic
commit
10b1987fda
1 zmienionych plików z 1 dodań i 1 usunięć
  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.
 		    # Note: Don't make simultaneous requests using a single HTTPRequest node.
 		    # The snippet below is provided for reference only.
 		    # The snippet below is provided for reference only.
 		    var body = {"name": "Godette"}
 		    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:
 		    if error != OK:
 		        push_error("An error occurred in the HTTP request.")
 		        push_error("An error occurred in the HTTP request.")