     _(http_opts.headers).extend Authorization: "Bearer #{auth.token}"
 
 make_request = (opts, cb) ->
-  p = Q.defer()
-  quest opts, (err, resp, body) ->
-    handle_errors resp, body, (err, resp, body) ->
-      p.reject err if err
-      p.resolve body?.data
-      return cb?(err) if err
-      cb?(err, body?.data)
+  promise = new Promise (resolve, reject) ->
+    quest opts, (err, resp, body) ->
+      handle_errors resp, body, (err, resp, body) ->
+        reject err if err
+        resolve body?.data
+        return cb?(err) if err
+        cb?(err, body?.data)
   return cb if _.isFunction(cb)
-  p.promise
+  promise
 
 Clever = module.exports = (auth, url_base=API_BASE, options={}) ->
   throw new Error 'Must provide auth' if not auth

      _(opts).extend(headers: options.headers) if options.headers
      apply_auth clever.auth, opts
      waterfall = [async.apply quest, opts].concat(@_post['exec'] or [])
      async.waterfall waterfall, (err, data) ->
        p.reject err if err
        p.resolve data
        return cb?(err) if err
        cb?(err, data)
      return cb if _.isFunction(cb)
      p.promise
  class Update extends Writeback
    _method: 'patch'
  class Create extends Writeback

API_BASE = 'https://api.clever.com'
CLEVER_BASE = 'https://clever.com'

Promise = Q.Promise

handle_errors = (resp, body, cb) ->
  return cb?(null, resp, body) if resp.statusCode is 200
  err = new Error "received statusCode #{resp.statusCode} instead of 200"
