html request, no data back
-
Hello,
The script does not work on real devices, but it works fine in emulator
var http = new XMLHttpRequest() var url = "http://ubuntutouch.people8people.com:8080/news/app/searcNews.php"; var params = "searchNews=" +searchText; http.open("POST", url, true); // Send the proper header information along with the request http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http.setRequestHeader("Content-length", params.length); http.setRequestHeader("Connection", "close"); http.onreadystatechange = function() { // Call a function when the state changes. console.log(http.responseText) } http.send(params);
Do i have to setup on my ubuntu touch devices?
Thanks For your time
-
@007fred50 have you declared "networking" policy in app armor file ?
-
@lduboeuf no there and how?
-
-
@lduboeuf Thanks it works now
-
@007fred50 great, don't forget to mark this topic as "Solved"