Hi, your question is about express, you should try https://groups.google.com/forum/#!forum/express-js
That being said, i suppose the "on-finished" module can help you, and also https://github.com/kapouer/express-buffer-response/blob/master/index.js might exactly match your needs. Jérémy 2017-06-02 20:56 GMT+02:00 Ricardo Ovando <[email protected]>: > i'm trying to block res.send() from sending the response if the headers > already have been sent (trying to implement an async code here) > > > but the difficulty is that i don't want to intervine with the code > directly , but using an event or something else > > > i tried with with process.exit but it kills everything, the 'finish' event > is too late because node already sent the response back > > > i need help please :( > > -- > Job board: http://jobs.nodejs.org/ > New group rules: https://gist.github.com/othiym23/9886289#file- > moderation-policy-md > Old group rules: 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 unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/nodejs/7c36a5be-b490-41c4-987d-5d1b44886cdb%40googlegroups.com > <https://groups.google.com/d/msgid/nodejs/7c36a5be-b490-41c4-987d-5d1b44886cdb%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAJxTCxwhsMbKt2FS5EFx-WWFQeKTauyHf%3DkMH9PAxKx1_Q9WDQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
