import 'hyperagent/config' as c;

function ajax(options) {
  var deferred = c.defer();
  c.ajax(c._.extend(options, {
    success: deferred.resolve,
    error: deferred.reject
  }));

  return deferred.promise;
}

export = ajax;

import 'hyperagent/config' as c;

function ajax(options) {
  var deferred = c.defer();
  c.ajax(c._.extend(options, {
    headers: {
      'Accept': 'application/hal+json, application/json, */*; q=0.01',
      'X-Requested-With': 'XMLHttpRequest'
    },
    success: deferred.resolve,
    error: deferred.reject
  }));

  return deferred.promise;
}

export = ajax;

Add some hard-coded headers for now
Add some hard-coded headers for now
