[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));