aws/aws-sdk-js — pull request #126 by lsegal (2013-06-27 23:39:28+00:00)
Title: Add callback to AWS.Request.send()

Adds a callback to `AWS.Request.send()` to avoid `on('complete')` events. Instead of writing:

```js
var request = s3.listObjects({Bucket: bucket});
request.httpRequest.headers['ArbitraryHeader'] = 'value';
request.on('complete', function (response) {
console.log(response.data);
});
```

You can now use the same callback syntax that `listObjects` accepts:

```js
var request = s3.listObjects({Bucket: bucket});
request.httpRequest.headers['ArbitraryHeader'] = 'value';
request.send(function (err, data) {
console.log(data);
});
```