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"
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login