Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / HTTP code not working in HTML5

Author
Message
niansenx
8
Years of Service
User Offline
Joined: 29th Jan 2016
Location:
Posted: 27th Jan 2018 13:59
Hello. Can someone help? The code below downloads a file from my internet website and it works absolutely fine when I run it in AppGameKit, but when I export it as HTML5 and run it in my browser, the loop that waits for the response loops forever, the value of getHTTPResponseReady stays at -1. Can anyone tell me what I'm doing wrong?

if GetInternetState() =1
//set up web
http = CreateHTTPConnection()
SetHTTPHost(http, "www.cyadonia.co.uk", 0)
gethttpfile(http, "sitemap.xml", "data\sitemap.xml")
repeat
Sync()
print(str(GetHTTPResponseReady( http )))
until GetHTTPResponseReady( http ) = 1
CloseHTTPConnection(http)
DeleteHTTPConnection(http)
endif

Login to post a reply

Server time is: 2024-04-16 23:46:36
Your offset time is: 2024-04-16 23:46:36