Sha256: 2f85bbf3a31626669a4bf9e5ba04e78d9af78cb294456fe9d7d32ccd45f42843

Contents?: true

Size: 617 Bytes

Versions: 50

Compression:

Stored size: 617 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 = Knj::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)
  raise "Body was empty." if res.body.to_s.length <= 0
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
knjrbfw-0.0.59 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.58 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.57 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.55 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.54 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.53 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.52 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.51 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.50 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.49 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.48 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.47 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.46 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.45 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.44 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.43 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.42 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.41 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.40 lib/knj/tests/test_http2_proxy.rb
knjrbfw-0.0.39 lib/knj/tests/test_http2_proxy.rb