// Performing an ajax request in jQuery
$.ajax( { url : '', data: {}, dataType:'jsonp', jsonpCallback: 'callbackName', type: 'post'
,success:function (data) {
console.log('ok');
},
error:function () {
console.log('error');
}
});
Is there a way to achieve the same functionality using pure JavaScript?