No Response From Network.request

Hello,

 

I am trying to call a .aspx page to check the response it returns. I posted the URL in my web browser with the parameters and returned the one line text I was looking for. When I put it in my project and I call it I don’t get anything.

 

I copied/pasted the example below from the docs and just replaced the url and parameters. I then added it to a button event to call it. I don’t even get an error to show when run on my Android phone.

 

I showed what I changed except for the url. It seems like I would have gotten the Error alert I added.  Thanks!!!

 

local function networkListener( event ) if ( event.isError ) then print( "Network error!") native.showAlert( "ERROR", "A network error has occured! You may not have internet connection or it is very weak.", { "OK" } ) else print ( "RESPONSE: " .. event.response ) native.showAlert( "Response", event.response, { "OK" } ) end end --postData = "color=red&size=small" postData = "e=" .. txtEmail.text .. "&p=" .. txtPWord.text local params = {} params.body = postData network.request( "http://127.0.0.1/formhandler.php", "POST", networkListener, params)

 

Nevermind… I forgot to uncomment the internet permissions in the build file. Can’t believe I didn’t do that! So if anyone else has this issue be sure to check your build file.

 

Warren

Nevermind… I forgot to uncomment the internet permissions in the build file. Can’t believe I didn’t do that! So if anyone else has this issue be sure to check your build file.

 

Warren