Actually, yes, there is a way to intercept the http request/response
mechanic.  This is some "working" code that I will be cleaning up at some
point, but for now it could suffice as a reference.  Of course you can also
use the precis-client-logger with the precis-file-adapter or
precis-console-adapter if you don't want to rewrite it or copy/paste it.

https://github.com/precis-logging/client-logger/blob/master/lib/http-capture.js

Really though, your GET and POST won't got out at the same time, they might
be close but they will never be exact.  Within a few 100ms would be my best
guess.

On Wed, Jul 22, 2015 at 6:29 PM, Jonathan Uesato <[email protected]> wrote:

> I'm trying to use Node.js to make a series (~1000) of HTTP requests which
> are duplex connections. I'm worried that my GET and POST requests are not
> being sent out at the same time, because I get intermittent errors back
> from the server.
>
> Is there a way to monitor HTTP requests as they are actually sent out? For
> example, is there some event which is emitted when they leave the
> connection pool? If it matters, I'm using the request library, though I
> imagine this shouldn't make too much of a difference.
>
> --
> 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/fb684ffb-6586-4a84-b9eb-9b2093ab91b3%40googlegroups.com
> <https://groups.google.com/d/msgid/nodejs/fb684ffb-6586-4a84-b9eb-9b2093ab91b3%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/CAAhs7Ehb1BYbnMpa2BC10aMKpCZ4YC1C9OTpSi1jaC37-7TKNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to