jQuery AJAX request demo

JavaScript

var xmlHttpReq = $.ajax({
      url: '',
      dataType: 'json',
      type: 'GET'
    }).always(function(processedDataOrXHRWrapper, textStatus, xhrWrapperOrErrorThrown) {

      throw "something";

    }).then(function() {

      alert("i want to always run no matter what");
    });