var request = require('client/libs/ajax');
var RSVP = require('rsvp');
var Promise = RSVP.Promise;

function errHandler(err) {
  if (err.status === 401) {
    window.location = '/auth/logout';
  }
  return new Promise(function(resolve, reject) {
    reject(err);
  });
}

var fetch = {};

['get', 'post', 'put', 'delete'].forEach((m) => {
  fetch[m] = function(options) {
    return request[m]({
      url: options.url,
      dataType: options.dataType || 'json',
      data: options.data,
      contentType: 'application/json',
      headers: {
        REGION: HALO.current_region
      }
    }).catch(errHandler);
  };
});

module.exports = fetch;

@@ -373,120 +373,56 @@
     
-return request%5Bm%5D(%7B%0A      url: options.url,%0A      dataType: options.dataType %7C%7C 'json',%0A      data: options.data
+var opt = Object.assign(%7B%0A      dataType: 'json'
 ,%0A  
@@ -519,21 +519,59 @@
       %7D%0A
-
     %7D
+, options);%0A%0A    return request%5Bm%5D(opt
 ).catch(

modify fetch.js dashboard