I’m trying to send json data to an http url without success (I tried to send same data to an other https with success).
I have this settings:
config.xml
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
AndroidManifest.xml
android:usesCleartextTraffic="true"
html header
$.ajax({
type: "GET",
url: url,
dataType: "jsonp",
jsonp: 'callback',
crossDomain: true,
async: true,
data: {id:results.rows.item(i).id, bolla:results.rows.item(i).bolla, anno:results.rows.item(i).anno, magazzino:results.rows.item(i). magazzino, articolo:results.rows.item(i).articolo, quantita:results.rows.item(i).quantita, term:terminale},
success: function(data) {
console.log(data)
},
error:function(xhr,textStatus,err)
{
alert("readyState: " + xhr.readyState);
alert("responseText: "+ xhr.responseText);
alert("status: " + xhr.status);
alert("text status: " + textStatus);
alert("error: " + err);
}
});
If I use json it returns devicereadystate=0 and error if I use jsonp it returns devicereadystate=4 and error 404 (the url is correct if I paste to a browser it works)