EventMachine based Multi request client, based on a streaming HTTPRequest class, which allows you to open multiple parallel connections and return only when all of them finish. (i.e. ideal for parallelizing workloads)
EventMachine.run { multi = EventMachine::MultiRequest.new # add multiple requests to the multi-handler multi.add(EventMachine::HttpRequest.new('http://www.google.com/').get) multi.add(EventMachine::HttpRequest.new('http://www.yahoo.com/').get) multi.callback { p multi.responses[:succeeded] p multi.responses[:failed] EventMachine.stop } }
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.