title: AJAX promise call handling
body: <p>I have an Ember promise call as below;</p>
  
  <pre><code>var promise = new Ember.RSVP.Promise(function(resolve, reject) {
      return $.ajax({
      //want this common
          url: requestUrl,
          type: type, // HTTP method
          dataType: dataType, // type of data expected from the API response
          contentType: 'application/json; charset=utf-8',
          data: JSON.stringify(postData)
      })
      .done(function(data, status, xhrObject) {
      //But want this to be different
        // resolve call
      })
      .fail(function(xhrObject, status, error){
        // reject call
      });
  })
  </code></pre>
  
  <p>My question is can I use common code for $.ajax(), but have different implementation for done() callback
  I can check that by passing some parameter from the calling place.</p>
  
  <p>so basically, I want</p>
  
  <pre><code>if (someparam == 'handleDone1')
      call resolve(data)
  else
      call resolve({data})
  </code></pre>