developerforce/Force.com-JavaScript-REST-Toolkit — pull request #18 by cwarden (2012-09-14 20:03:59+00:00)
Title: Make ajax method compatible with nextRecordsUrl

The ajax call no longer prepends /services/data to paths that already
start with it. This allows the ajax method to be used with the URL
contained in the nextRecordsUrl attribute of the result object passed to
the query method's success callback.

Here's an example:

```javascript
forcetkClient.query('SELECT Id, Name FROM Account', handleResult, function() {});

function handleResult(result) {
// do something with the result
if (! result.done) {
forcetkClient.ajax(result.nextRecordsUrl, handleResult, function() {});
}
}
```