Browse Source

Merge pull request #108230 from Miziziziz/patch-1

Fix image download example code
Thaddeus Crews 1 month ago
parent
commit
2be0d7bb8f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      doc/classes/HTTPRequest.xml

+ 2 - 2
doc/classes/HTTPRequest.xml

@@ -90,7 +90,7 @@
 			http_request.request_completed.connect(self._http_request_completed)
 
 			# Perform the HTTP request. The URL below returns a PNG image as of writing.
-			var error = http_request.request("https://placehold.co/512")
+			var error = http_request.request("https://placehold.co/512.png")
 			if error != OK:
 				push_error("An error occurred in the HTTP request.")
 
@@ -120,7 +120,7 @@
 			httpRequest.RequestCompleted += HttpRequestCompleted;
 
 			// Perform the HTTP request. The URL below returns a PNG image as of writing.
-			Error error = httpRequest.Request("https://placehold.co/512");
+			Error error = httpRequest.Request("https://placehold.co/512.png");
 			if (error != Error.Ok)
 			{
 				GD.PushError("An error occurred in the HTTP request.");