I have a tournament module which is REST.
I can call it using http://localhost:8888/tournament. Now what I wants to do is,
I am having another module that uses this API.
The another module is tournament module,on load I am fetching the API with the help of curl thats working fine but I have ADD button on my Page and I wants to use ajax to call API for adding data on clicking on add button.
how should I do it ?
I have created REST in Zend with dynamodb as backend.
we can call ajax onCLick of button and call AJAX like..
$('#btnadad').on('click',function (e){
alert("ok");
$.ajax({
type:'GET',
url :"/tournament",
dataType: 'json',
success: function(data) {
console.log('success',data);
},
error:function(exception){alert('Exeption:'+exception);}
});
e.preventDefault();
});