WebService Rest PHP appellé en Jquery
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 ;
Citation:
<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 />
Ci-dessous, la manière dont j'appelle le webservice :
Code:
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");
}
}); |
Pourriez-vous me prêter main forte ?
Merci.