let req = new Drupal.ajax({
url: '/abc/def/' ,
base: false,
element: false,
submit: { 'data': dayNum },
progress: false,
});
// Override success callback
req.options.success = (response, status) => {
// Call original method with main functionality
//Drupal.ajax.prototype.success.call(req, response, status);
console.log(response, status);
};
req.execute();