1
require 'rubygems' if RUBY_VERSION < '1.9'
4
Bundler.require(:default)
5
Bundler.require(:benchmark)
9
require File.join(File.expand_path(File.dirname(__FILE__)), '..', 'lib', 'excon')
12
class Server < Sinatra::Base
15
Rack::Handler::WEBrick.run(
19
:Logger => WEBrick::Log.new(nil, WEBrick::Log::ERROR)
23
get '/data/:amount' do |amount|
30
def with_server(&block)
37
Excon.get('http://localhost:9292/api/foo')
50
path = '/data/' << size.to_s
51
url = 'http://localhost:9292' << path
63
excon = Excon.new(url)
64
tach('Excon (persistent)') do
65
excon.request(:method => 'get').body