Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
How to send data to http server — Gideros Forum

How to send data to http server

phongttphongtt Guru
edited August 2012 in General questions
This may be a silly question but I have zero knowledge of luasocket in Gideros.
Say, I want to send data to mydomain.com, supplying 2 strings, and get the result (i.e. concatenation of them) from mydomain.com.
How do do that? Thanks :)

Comments

  • ar2rsawseenar2rsawseen Maintainer
    edited August 2012 Accepted Answer
    I think it's easier to do it using UrlLoader class
    local loader = UrlLoader.new("<a href="http://mydomain.com/somescript.php?string1=firststring&somestring2=secondstring&quot" rel="nofollow">http://mydomain.com/somescript.php?string1=firststring&somestring2=secondstring&quot</a><img class="emoji" src="http://forum.gideros.rocks/resources/emoji/wink.png" title=";)" alt=";)" height="20" />
     
    local function onComplete(event)
        --what server returned
        print(event.data)
    end
     
    loader:addEventListener(Event.COMPLETE, onComplete)
Sign In or Register to comment.