developerforce/Force.com-JavaScript-REST-Toolkit — pull request #9 by tomgersic (2011-11-21 20:52:44+00:00)
Title: Utility function to query the Chatter API and download a file.

/**
* Utility function to query the Chatter API and download a file
* Note, raw XMLHttpRequest because JQuery mangles the arraybuffer
* This should work on any browser that supports XMLHttpRequest 2 because arraybuffer is required.
* For mobile, that means iOS >= 5 and Android >= Honeycomb
* @author Tom Gersic
* @param path resource path relative to /services/data
* @param mimetype of the file
* @param callback function to which response will be passed
* @param [error=null] function to which request will be passed in case of error
* @param rety true if we've already tried refresh token flow once
**/

Signed-off-by: Tom Gersic