Skip to content

Instantly share code, notes, and snippets.

@raycmorgan
Created October 12, 2009 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raycmorgan/208555 to your computer and use it in GitHub Desktop.
Save raycmorgan/208555 to your computer and use it in GitHub Desktop.
post('/', function () {
this.parseBody()
.addCallback(function (body) {
});
});
var promise = new node.Promise();
var buffer = "";
this.req
.addListener('body', function (chunk) {
buffer += chunk;
})
.addListener('complete', function () {
promise.emitSuccess(parse(buffer));
});
return promise;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment