here is my code response is 302 no found but when i check this controller directly by url it is working fine
jQuery(document).ready(function() {
var customurl = "<?php echo $baseUrl.'admin/pricingoption/option/editfieldphtml'?>";
jQuery.ajax({
url: customurl,
type: 'POST',
dataType: 'json',
data: { },
complete: function(response) {
// console.log(response);
console.log('bxhgjkhgfdsfghjkhgfd');
},
error: function (xhr, status, errorThrown) {
console.log('Error happens. Try again.');
}
});
});
ADDITIONAL INFO: I am getting this error because of POST call i dont know why it is behaving like such on admin side so i have to change my ajax call to GET and it works fine