Fixed Http GET - OnHttpRequestComplete

magic

Active member
3rd Party Module Dev
3rd Party Tool Dev
Joined
Mar 5, 2018
Messages
158
ResponseText() always return NULL?

tested on both android and html5 with Cerberus HttpRequest example.
 

Martin

Active member
CX Code Contributor
3rd Party Module Dev
Tutorial Author
Joined
Jun 19, 2017
Messages
320
Will have a look! I never had issues with http requests so far.

At least for HTML5 you can only access stuff on the same server as the app is running.
Regarding Android: Have you enabled network permissions?
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,846
They seem to work. Just the test server that is called in that script seems to be down.

Try this one:

httpbin.org/
 

magic

Active member
3rd Party Module Dev
3rd Party Tool Dev
Joined
Mar 5, 2018
Messages
158
Yes, network permission is enabled.

The example code produces no error. But then when I want to use the value produced by ResponseText(), its gives java lang error. Cannot convert Null to String. When I examined it, the ResponseText() always returns NULL on android.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,846
Seems that HttpRequest doesn't work with IOS. I tried my PubNub example and it returns nothing. On GLFW and HTML it does.
GLFW doesn't get the bytesreceived value, it is always zero.
Thanks @magic for reporting it.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,846
Might be an timeout problem. Need to investigate this further. @magic claimed that Monkey 79d works with his website. I tried and it doesn't. So it might be a problem with this site.
 
Top Bottom