Bonjour,
J'ai un webservice qui fonctionne si je l'appelle par l'url du navigateur, il me renvoit bien un flux "json".
Par contre quand j'appelle, cette même url en ajax avec jquery, ca me donne l'erreur suivante ;
Ci-dessous, la manière dont j'appelle le webservice :<br />
<b>Notice</b>: Undefined index: rquest in <b>C:\Program Files\EasyPHP-5.3.9\www\rest\api.php</b> on line <b>42</b><br />
Pourriez-vous me prêter main forte ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 $.ajax({ type: "GET", data: "rquest=users", contentType: "application/json", dataType:"json", url: "http://localhost/rest/api.php", success: function(contenu,etat){ alert("ok"); } });
Merci.
Partager