Created
October 12, 2009 17:24
-
-
Save raycmorgan/208555 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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