mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Merge pull request #2155 from eska014/html5-3.1
Update web platform docs
This commit is contained in:
@@ -51,7 +51,12 @@ It will connect and fetch a website.
|
||||
# Keep polling for as long as the request is being processed.
|
||||
http.poll()
|
||||
print("Requesting...")
|
||||
OS.delay_msec(500)
|
||||
if not OS.has_feature("web"):
|
||||
OS.delay_msec(500)
|
||||
else:
|
||||
# Synchronous HTTP requests are not supported on the web,
|
||||
# so wait for the next main loop iteration.
|
||||
yield(Engine.get_main_loop(), "idle_frame")
|
||||
|
||||
assert(http.get_status() == HTTPClient.STATUS_BODY or http.get_status() == HTTPClient.STATUS_CONNECTED) # Make sure request finished well.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user