Sha256: c1bf49f417be519f7ee52b103a8ef52804cb876a485a0203dd6bc44550ea5e46

Contents?: true

Size: 620 Bytes

Versions: 51

Compression:

Stored size: 620 Bytes

Contents

#!/usr/bin/env ruby1.9.1

require "#{File.dirname(__FILE__)}/../../knjrbfw.rb"
require "knj/autoload"

proxy_settings = Marshal.load(File.read("#{File.dirname(__FILE__)}/test_http2_proxy_settings.marshal"))

http = Http2.new(
  :host => "www.partyworm.dk",
  :proxy => proxy_settings
)

urls = [
  "?show=users_search",
  "?show=users_online",
  "?show=drinksdb",
  "?show=forum&fid=9&tid=1917&page=0"
]
urls = ["robots.txt"]

0.upto(105) do |count|
  url = urls[rand(urls.size)]
  print "Doing request #{count} of 200 (#{url}).\n"
  res = http.get(:url => url)
  raise "Body was empty." if res.body.to_s.length <= 0
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
knjrbfw-0.0.116 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.115 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.114 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.113 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.111 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.110 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.109 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.108 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.107 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.105 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.104 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.103 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.102 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.101 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.100 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.99 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.98 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.97 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.96 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.95 lib/knj/tests/test_http2_proxy.rb