diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2016-12-13 10:57:05 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2016-12-13 11:09:37 +0100 |
commit | d194e1c48e5d161f0310ee17e63f1951e2c50de6 (patch) | |
tree | f7e566071e123eed61c4af4f29dc32bd828ab632 /scene | |
parent | de23ce11b51847b7b8bfc10ecf5926827516ac5a (diff) |
Expose HTTP classes' set_ip_type to scripting
Diffstat (limited to 'scene')
-rw-r--r-- | scene/main/http_request.cpp | 1 | ||||
-rw-r--r-- | scene/main/http_request.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index 4667812312..46ab385954 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -539,6 +539,7 @@ int HTTPRequest::get_body_size() const{ void HTTPRequest::_bind_methods() { + ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&HTTPRequest::set_ip_type); ObjectTypeDB::bind_method(_MD("request","url","custom_headers","ssl_validate_domain","method","request_data"),&HTTPRequest::request,DEFVAL(StringArray()),DEFVAL(true),DEFVAL(HTTPClient::METHOD_GET),DEFVAL(String())); ObjectTypeDB::bind_method(_MD("cancel_request"),&HTTPRequest::cancel_request); diff --git a/scene/main/http_request.h b/scene/main/http_request.h index 4dd79234b0..978ad3428b 100644 --- a/scene/main/http_request.h +++ b/scene/main/http_request.h @@ -116,7 +116,7 @@ protected: static void _bind_methods(); public: - virtual void set_ip_type(IP::Type p_type); + void set_ip_type(IP::Type p_type); Error request(const String& p_url, const Vector<String>& p_custom_headers=Vector<String>(), bool p_ssl_validate_domain=true, HTTPClient::Method p_method=HTTPClient::METHOD_GET, const String& p_request_data=""); //connects to a full url and perform request void cancel_request(); HTTPClient::Status get_http_client_status() const; |