Hello!
On real devices and in xcode simulator POST request return event.isError. On android and in corona simulator it works fine. Maybe there is some permissions for iOs but in docs I don’t found them, only for android.
Here is code:
local function networkListener(event) if (event.isError) then print("Network error!") else print("RESPONSE: " .. event.response) answer = event.response end end local headers = {} headers["Content-Type"] = "application/x-www-form-urlencoded" headers["Accept-Language"] = "en-US" local login = userEmail local password = userPassword local current\_program = currentProgram local current\_day = currentDay local totalN = total local level = currentLevel local change\_program = programChange local body = 'app\_id=' .. \_APP\_ID .. '&login=' .. login .. '&password=' .. password .. '¤t\_program=' .. current\_program .. '¤t\_day=' .. current\_day .. '&total=' .. totalN .. '&level=' .. level .. '&change\_program=' .. change\_program local params = {} params.headers = headers params.body = body network.request("http://mydomain/backup", "POST", networkListener, params)
Thank you!