From 2f82b670716c8b1188db8cb036fe5b7dea0fc490 Mon Sep 17 00:00:00 2001 From: Poommetee Ketson Date: Fri, 20 Apr 2018 16:25:06 +0700 Subject: [PATCH] [DOCS] add HTTPRequest.request return values (cherry picked from commit f05e24ed18575e2f48270025c4c2bb0705c667b5) --- doc/classes/HTTPRequest.xml | 2 ++ drivers/unix/ip_unix.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index beb40a9fb31..ef29eb4b686 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -55,6 +55,8 @@ + Creates request on the underlying [HTTPClient]. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request]. + Returns [code]OK[/code] if request is successfully created. (Does not imply that the server has responded), [code]ERR_UNCONFIGURED[/code] if not in the tree, [code]ERR_BUSY[/code] if still processing previous request, [code]ERR_INVALID_PARAMETER[/code] if given string is not a valid URL format, or [code]ERR_CANT_CONNECT[/code] if not using thread and the [HTTPClient] cannot connect to host. diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp index 032d91f0dc0..a7fb0c38875 100644 --- a/drivers/unix/ip_unix.cpp +++ b/drivers/unix/ip_unix.cpp @@ -105,7 +105,7 @@ IP_Address IP_Unix::_resolve_hostname(const String &p_hostname, Type p_type) { int s = getaddrinfo(p_hostname.utf8().get_data(), NULL, &hints, &result); if (s != 0) { - ERR_PRINT("getaddrinfo failed!"); + ERR_PRINT("getaddrinfo failed! Cannot resolve hostname."); return IP_Address(); };