make HTTP requests work in web build

This commit is contained in:
Haze Weathers 2024-12-10 16:12:04 -05:00
parent b8c3cdd0a7
commit 0a706e1120

View file

@ -43,7 +43,7 @@ func _ready() -> void:
http = HTTPRequest.new()
http.download_chunk_size = 4096
http.timeout = 30.0
http.use_threads = true
http.use_threads = OS.get_name() != "HTML5"
http.connect("request_completed", self, "_on_request_completed")
add_child(http)