[DOCS] add HTTPRequest.request return values

This commit is contained in:
Poommetee Ketson 2018-04-20 16:25:06 +07:00
parent 59b816679e
commit f05e24ed18
2 changed files with 3 additions and 1 deletions

View File

@ -55,6 +55,8 @@
<argument index="4" name="request_data" type="String" default="&quot;&quot;"> <argument index="4" name="request_data" type="String" default="&quot;&quot;">
</argument> </argument>
<description> <description>
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.
</description> </description>
</method> </method>
</methods> </methods>

View File

@ -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); int s = getaddrinfo(p_hostname.utf8().get_data(), NULL, &hints, &result);
if (s != 0) { if (s != 0) {
ERR_PRINT("getaddrinfo failed!"); ERR_PRINT("getaddrinfo failed! Cannot resolve hostname.");
return IP_Address(); return IP_Address();
}; };