Hello all,
I’m having a bit of a networking issue pertaining to the network.Request function. I have an HTML/JavaScript script on my website that takes the information from the provided URL, parses it and fills in the fields based of the parameters in the URL. I will make parts of the URL example generic as to protect my site’s info. Here is an easy example if you need it:
I can type something like this into my Google Chrome bar:
and it works. The parameters passed in are filled into the form found in the HTML script and the form is submitted thus resulting in me getting an email confirmation. Note: I do not have to interact with the HTML form at all, since the script auto submits it. Within my Corona SDK app, I connect to the website properly ( I can see the website HTML in the output console ) yet I do not receive my confirmation email. This leads me to believe the form is not being submitted. Is this an issue with my code, or perhaps a permissions issue on server side where my website is hosted? Below is my code, please let me know your thoughts. Thank you.
display.setStatusBar( display.HiddenStatusBar )
local function networkListener( event )
if ( event.isError ) then
print( “Network error!” )
else
print ( "RESPONSE: " … event.response )
end
end
network.request( “http://website.com/somePage? UserID=123456789&DistanceWalked=2.1m&TimeWalked=42min&EmailAddress=myEmail@ymail.com”, “POST”, networkListener)