diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-12-06 13:30:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-06 13:30:53 +0100 |
commit | 608c9f820349ca13f017ea406c790d90729da837 (patch) | |
tree | ba7e7eba4318205b8fecee676aa673815ffab50e /core/io/http_client.cpp | |
parent | a512edcfb9cfff28689f526b6954087b3b596211 (diff) | |
parent | c09ea8d45acdf02df30b658408137f2ca7be2533 (diff) | |
download | redot-engine-608c9f820349ca13f017ea406c790d90729da837.tar.gz |
Merge pull request #47257 from timothyqiu/http-client-proxy
Diffstat (limited to 'core/io/http_client.cpp')
-rw-r--r-- | core/io/http_client.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index 800ac779e5..5c67bc4c48 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -49,6 +49,14 @@ HTTPClient *HTTPClient::create() { return nullptr; } +void HTTPClient::set_http_proxy(const String &p_host, int p_port) { + WARN_PRINT("HTTP proxy feature is not available"); +} + +void HTTPClient::set_https_proxy(const String &p_host, int p_port) { + WARN_PRINT("HTTPS proxy feature is not available"); +} + Error HTTPClient::_request_raw(Method p_method, const String &p_url, const Vector<String> &p_headers, const Vector<uint8_t> &p_body) { int size = p_body.size(); return request(p_method, p_url, p_headers, size > 0 ? p_body.ptr() : nullptr, size); @@ -142,6 +150,9 @@ void HTTPClient::_bind_methods() { ClassDB::bind_method(D_METHOD("get_status"), &HTTPClient::get_status); ClassDB::bind_method(D_METHOD("poll"), &HTTPClient::poll); + ClassDB::bind_method(D_METHOD("set_http_proxy", "host", "port"), &HTTPClient::set_http_proxy); + ClassDB::bind_method(D_METHOD("set_https_proxy", "host", "port"), &HTTPClient::set_https_proxy); + ClassDB::bind_method(D_METHOD("query_string_from_dict", "fields"), &HTTPClient::query_string_from_dict); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "blocking_mode_enabled"), "set_blocking_mode", "is_blocking_mode_enabled"); |