Hi,
you can collect the payload and emit such an event for yourself.
Just an example:
var server = http.createServer(function(request, response) {
var this_ = this;
var payload = [];
request.on('data', function(data) {
payload.push(data);
});
request.on('end', function() {
payload = payload.join('');
this_.emit('payload', payload);
});
});
server.on('payload', function(payload) {
.. do your parsing here ..
});
Greetings
On Tue, Mar 13, 2012 at 11:02 PM, Daniel Morilha <[email protected]> wrote:
> Hi,
>
> I was investigating the http.js internals and found out the chunked
> transfer-type for incoming connections does not help. Essentially, I would
> like to have an event which emits only when we have the full chunk, which is
> the "parsable" unit in our application instead of the way on('data', ...)
> currently performs.
>
> Does that make sense?
>
> thanks,
> --
> Daniel Morilha ([email protected])
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
--
Oliver Leics @ G+
https://plus.google.com/112912441146721682527
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en