Some code would perhaps be helpful.
--
Pedro
On Friday, 20 de September de 2013 at 21:20, Eric wrote:
> Hi guys,
>
> I'm trying to write a service that performs the following actions:
>
> 1) receive an HTTP request from client with some data payload in body.
> 2) immediately reply with HTTP response 200 - ok
> 3) perform some calculations based on the payload and than performs an HTTP
> request to an external HTTP server.
>
> To do that once my http callback is fired I call res.send() and than I
> perform the calculations, then I create a new http object (var http =
> require('http')) and call it's request method. At this point the callback for
> this last call is never triggered.
>
> How should I do to reply to my http client as soon as possible and than do
> another http request?
>
> Thanks in advance,
>
> Eric
>
> --
> --
> 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
>
> ---
> 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].
> For more options, visit https://groups.google.com/groups/opt_out.
--
--
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
---
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].
For more options, visit https://groups.google.com/groups/opt_out.