lib/knj/tests/test_http2_proxy.rb in knjrbfw-0.0.59 vs lib/knj/tests/test_http2_proxy.rb in knjrbfw-0.0.62
- old
+ new
@@ -3,11 +3,11 @@
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(
+http = Http2.new(
:host => "www.partyworm.dk",
:proxy => proxy_settings
)
urls = [
@@ -19,8 +19,8 @@
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)
+ res = http.get(:url => url)
raise "Body was empty." if res.body.to_s.length <= 0
end
\ No newline at end of file