1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

[Net] Makes HTTPClient a custom instance class.

This commit is contained in:
Fabio Alessandrelli
2021-03-23 17:03:29 +01:00
parent 421e771012
commit b00c4a4360
8 changed files with 914 additions and 770 deletions

View File

@@ -628,7 +628,7 @@ void HTTPRequest::_bind_methods() {
}
HTTPRequest::HTTPRequest() {
client.instantiate();
client = Ref<HTTPClient>(HTTPClient::create());
timer = memnew(Timer);
timer->set_one_shot(true);
timer->connect("timeout", callable_mp(this, &HTTPRequest::_timeout));