stripe/stripe-node — pull request #132 by wangjohn (2014-12-16 20:23:31+00:00)
Title: Adding file uploads

This PR adds file uploads to the the node bindings. Here's a sample script using the `create` and `retrieve` methods on a file upload:

```node
var stripe = require('stripe')('SECRET_API_KEY');
var fs = require('fs');

var testFilename = "/home/wangjohn/stripe/stripe-node/test/resources/data/minimal.pdf";
var f = fs.readFileSync(testFilename);

stripe.fileUploads.create({
purpose: 'dispute_evidence',
file: {
data: f,
name: 'minimal.pdf',
type: 'application/octet-stream'
}
}, function(err, fileUpload) {
console.log("ERROR:");
console.log(err)

console.log(fileUpload);
stripe.fileUploads.retrieve(fileUpload.id, function(err, fu) {
console.log("ERROR:");
console.log(err)

console.log(fu);
});
});
```

The PR also adds a couple of things to the underlying `StripeResource` and `StripeMethod` which allow us to override the default headers, provide our own http data, and override the default host of `api.stripe.com`.

r? @michelle
cc @jayeb, @amfeng