This question already has an answer here:
i am try to get data using ajax in codeigniter but when i send request for get data to my controller at that time i get this error
The action you have requested is not allowed.
this is my ajax code
$.ajax({
type:'POST',
dataType: 'json',
url: "redeem_drink/testjs",
success: function(data){
console.log(data);
},
error: function(data){
console.log(data);
}
});
please help me how to setup ajax code for get and post data
</div>