When I access my phpscript the output look like this:
{“Text1”:[“1”,“1”,“2020-07-21”,“Testing”,“Magnus”]}
When I try to get it to my app something is wrong with the response from the server:
From server: This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support
Here is the code in the main.lua:
local json = require ("json")
local decodedData
local myNewData
local function networkListener( event )
if ( event.isError ) then
print( "Network error!")
else
myNewData = event.response
print ("From server: "..myNewData)
decodedData = (json.decode( myNewData))
print(decodedData)
end
end
network.request( "http://maholmsoftware.epizy.com/get.php", "GET", networkListener )
Somebody have an idea what I should do?
(Post edited by moderator; Please format code in posts using triple back-ticks to enclose code.; Click pencil icon to review changes and see how code was reformatted.)