EM HTTP Request
Background ()
require 'em-http-request'
$server = start_sinatra_app do
%w[ foo bar bazz ].each_with_index do |path, index|
get "/#{path}" do
sleep index * 0.1 # ensure the async callbacks are invoked in order
ARGV[0] + ' ' + path
end
end
end
require 'vcr'
VCR.configure do |c|
c.hook_into :webmock
c.cassette_library_dir = 'cassettes'
c.before_record do |i|
i.request.uri.sub!(/:\d+/, ':7777')
end
endmultiple simultaneous HttpRequest objects
MultiRequest
Last updated