Created
July 22, 2015 00:04
-
-
Save gartenfeld/2c21f37afd54959532e1 to your computer and use it in GitHub Desktop.
Extracting POST data in Node as the pieces arrive in a buffer stream.
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
var data = ''; | |
request.on('data', function (partial) { | |
data += partial; | |
}); | |
request.on('end', function () { | |
data = JSON.parse(data); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment