Good day, I would like to understand the Corona’s way to send a GET and POST Method to my PHP.
On my POST Method everything is fine with this kind of code:
local function saveListener( event ) if ( event.isError ) then print( "Network error: ", event.response ) else print ( "RESPONSE: " .. event.response ) end end local headers = {} headers["Content-Type"] = "application/x-www-form-urlencoded" headers["Accept-Language"] = "en-US" local body = "filename=".. file .."&something=".. some) local params = {} params.headers = headers params.body = body network.request( "urltoPHPfile.php", "POST", saveListener, params )
There is no error here everything is okay but when I use the GET Method, I can’t find my “filename” and “somnething” on the body parameters to my PHP, when I do it with HTML, it’s okay.
Thanks in advance