Permalink
Browse files

Add a verbose option to Request

  • Loading branch information...
1 parent 46a1b9b commit 2281dc87c895a76d83db168dbda37bce0b9305b1 @gravis gravis committed Jun 28, 2010
Showing with 4 additions and 1 deletion.
  1. +1 −0 lib/typhoeus/hydra.rb
  2. +3 −1 lib/typhoeus/request.rb
View
@@ -149,6 +149,7 @@ def get_easy_object(request)
easy.ssl_key_password = request.ssl_key_password
easy.ssl_cacert = request.ssl_cacert
easy.ssl_capath = request.ssl_capath
+ easy.verbose = request.verbose
easy.on_success do |easy|
queue_next
View
@@ -1,6 +1,6 @@
module Typhoeus
class Request
- attr_accessor :method, :params, :body, :headers, :timeout, :user_agent, :response, :cache_timeout, :follow_location, :max_redirects, :proxy, :disable_ssl_peer_verification, :ssl_cert, :ssl_cert_type, :ssl_key, :ssl_key_type, :ssl_key_password, :ssl_cacert, :ssl_capath
+ attr_accessor :method, :params, :body, :headers, :timeout, :user_agent, :response, :cache_timeout, :follow_location, :max_redirects, :proxy, :disable_ssl_peer_verification, :ssl_cert, :ssl_cert_type, :ssl_key, :ssl_key_type, :ssl_key_password, :ssl_cacert, :ssl_capath, :verbose
attr_reader :url
@@ -28,6 +28,7 @@ class Request
# ** +:ssl_key_password
# ** +:ssl_cacert
# ** +:ssl_capath
+ # ** +:verbose
#
def initialize(url, options = {})
@method = options[:method] || :get
@@ -48,6 +49,7 @@ def initialize(url, options = {})
@ssl_key_password = options[:ssl_key_password]
@ssl_cacert = options[:ssl_cacert]
@ssl_capath = options[:ssl_capath]
+ @verbose = options[:verbose]
if @method == :post
@url = url

0 comments on commit 2281dc8

Please sign in to comment.