You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Function 1: GET
On load, I have it connect to a site to make the GET request and it should return the user info (kivabolt) - [http://meehak.com/squared.php]
Function 2: POST
The second function I have is to POST to a different PHP page with a user's input and two hardcoded variables - [http://meehak.com/uploadUserResult.php]
--> to test the POST, i created a different page for manually submitting results (uploadUser.php)[http://meehak.com/uploadUser.php]
So when I test the project locally or export the project to a windows / desktop executable, the http requests (GET & POST) execute and have no issues connecting to the URL.
Problem #1 : When I upload the exported HTML5 project and host it on a server, I keep getting the error below: ERROR: At: drivers/unix/ip_unix.cpp:106:_resolve_hostname() - getaddrinfo failed!
Has anyone else ran into this problem? I'm stuck and have no idea what to try next.
I'm hosted via HostGator, no SSL (though I have tried it with an SSL site and hit the same issue)
Networking does not work for HTML export (at least in 2.1 branch).
I found the reason for the getaddrinfo failed error, we must specifically unset AI_NUMERICHOST which seems to be on by default, see their code for reference .
Sadly the subsequent socket creation fails anyway (should be converted to websockets by emscripten for what I understand, but it fails when calling ioctl somewhere, apparently when setting FIONBIO but I'm still unable to properly pinpoint where).
I'm still working on it, but in case I end up not having enough time at least we have this comment for reference.
EDIT: I did the tests on 2.1 branch, I'll check the status in 3.0 too
As a followup. in 3.0 when exporting using webassembly the tcp sockets gets converted as expected to websockets connections with Sec-WebSocket-Protocolheader as binary (so it should work, I'm still trying to find a server that supports Sec-WebSocket-Protocol).
In this case though for HTTPClient to work, we would want to implement it as an XMLHttpRequest I guess,
Operating system or device - Godot version:
Running with Godot v2.1.3.stable.official
Issue description:
I'm playing around with simple GET and POST requests based off this tutorial:(http://docs.godotengine.org/en/stable/learning/features/networking/http_client_class.html)
Function 1: GET
On load, I have it connect to a site to make the GET request and it should return the user info (kivabolt) - [http://meehak.com/squared.php]
Function 2: POST
The second function I have is to POST to a different PHP page with a user's input and two hardcoded variables - [http://meehak.com/uploadUserResult.php]
--> to test the POST, i created a different page for manually submitting results (uploadUser.php)[http://meehak.com/uploadUser.php]
So when I test the project locally or export the project to a windows / desktop executable, the http requests (GET & POST) execute and have no issues connecting to the URL.
Problem #1 : When I upload the exported HTML5 project and host it on a server, I keep getting the error below:
ERROR: At: drivers/unix/ip_unix.cpp:106:_resolve_hostname() - getaddrinfo failed!
Has anyone else ran into this problem? I'm stuck and have no idea what to try next.
I'm hosted via HostGator, no SSL (though I have tried it with an SSL site and hit the same issue)
[Github Repository]
[httpfun running on server]
The text was updated successfully, but these errors were encountered: