From: Curt Sampson Date: 2007-12-24T22:33:10+09:00 Subject: Re: notify a web-service: sending non-blocking http requests On 2007-12-24 21:47 +0900 (Mon), d c wrote: > i want to notify a webservice of something, but not wait for the > response. whats the best way to do this? HTTP doesn't let you do this reliably. The best thing to do is change the service so that it returns immediately to acknowledge receipt of the request. Then just use standard Net::HTTP. > i could use the timeout library i guess with a timeout of 0 ? which i > guess spawns a thread... Or just spawn a thread and then have the thread wait for the response. Be careful, however; Ruby threads are not asynchronous when you're waiting for IO, unless you're careful to wait in select(). > or use > system("curl #{url}") That will wait for the response. > is there a UDP package for ruby? Yes, but you can't do HTTP over UDP; you're misunderstanding the protocol. cjs -- Curt Sampson +81 90 7737 2974 Mobile sites and software consulting: http://www.starling-software.com