[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

http post is async or sync?

Rm Rm

1/4/2008 6:57:00 AM

Hi,
I am using

Net::HTTP.post_form URI.parse(Url), { .......... }

in my application. But this slows the process, hence I was wondering if
this http call is synchronus or asynchronus? I couldn't find any
information about it so any help is appreciated.

Thanks.
--
Posted via http://www.ruby-....

4 Answers

Paul Stickney

1/6/2008 5:38:00 AM

0

Synchronous. But of course you could test this in IRB.

On Jan 3, 2008 10:57 PM, Rm Rm <renu@2cast.net> wrote:
> Hi,
> I am using
>
> Net::HTTP.post_form URI.parse(Url), { .......... }
>
> in my application. But this slows the process, hence I was wondering if
> this http call is synchronus or asynchronus? I couldn't find any
> information about it so any help is appreciated.
>
> Thanks.
> --
> Posted via http://www.ruby-....
>
>

Rm Rm

1/6/2008 5:46:00 PM

0

Paul Stickney wrote:
> Synchronous. But of course you could test this in IRB.

Thanks.How can I make an asynchronus call?
--
Posted via http://www.ruby-....

Francis Cianfrocca

1/6/2008 5:51:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

On Jan 6, 2008 12:46 PM, Rm Rm <renu@2cast.net> wrote:

> Paul Stickney wrote:
> > Synchronous. But of course you could test this in IRB.
>
> Thanks.How can I make an asynchronus call?
> --
> Posted via http://www.ruby-....
>
>

If you're willing to rearrange your application, you can use
Ruby/EventMachine to make async HTTP calls. (SMTP, DNS, others are supported
as well.)

Paul Stickney

1/7/2008 3:45:00 AM

0

I don't see any particular reason why threads wouldn't work either.
(But I have not threaded around the HTTP API and there may be some nuances.)