function NetworkResponseInterceptor () {
  this._originalAjax = $.ajax;
  this._successInterceptors = [];
  this._errorInterceptors = [];
  this._urlPatterns = [];
}
Network Interceptors

Tool to easily intercept network responses in order
to override or add behaviours on top of the usual ones