summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-01-02 15:51:45 +0100
committerGitHub <noreply@github.com>2017-01-02 15:51:45 +0100
commit0b2771bd6561152cdb0e650538a572a242068f01 (patch)
treeb44c1ab2d50f14521cb7d9cafcee37b551871c66 /scene/main
parent6428ebd91faa757aff419e3f6d1ccc63b699dd11 (diff)
parentd194e1c48e5d161f0310ee17e63f1951e2c50de6 (diff)
Merge pull request #7271 from Faless/ipv6_cleanup
Fixes and improvementes for IPv6 implementation.
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/http_request.cpp5
-rw-r--r--scene/main/http_request.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index 956f6e0422..4203edda77 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -28,6 +28,10 @@
/*************************************************************************/
#include "http_request.h"
+void HTTPRequest::set_ip_type(IP::Type p_type) {
+ client->set_ip_type(p_type);
+}
+
void HTTPRequest::_redirect_request(const String& p_new_url) {
@@ -535,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 89d790d53b..5bf47111e8 100644
--- a/scene/main/http_request.h
+++ b/scene/main/http_request.h
@@ -116,6 +116,7 @@ protected:
static void _bind_methods();
public:
+ 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;