Sha256: 53d8162c7a2fa4986b6df7712ed61b8e864dcfe577a950222628118e834f5d14

Contents?: true

Size: 536 Bytes

Versions: 20

Compression:

Stored size: 536 Bytes

Contents

#
# extends HTTParty by adding configurable timeout support
#
module HTTParty
  class Request
    
    private
    
      def http
        http = Net::HTTP.new(uri.host, uri.port, options[:http_proxyaddr], options[:http_proxyport])
        http.use_ssl = (uri.port == 443)
        http.verify_mode = OpenSSL::SSL::VERIFY_NONE
        if options[:timeout] && options[:timeout].is_a?(Integer)
          http.open_timeout = options[:timeout]
          http.read_timeout = options[:timeout]
        end
        http
      end
    
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
attack-barometer-0.1.0 lib/barometer/extensions/httparty.rb
attack-barometer-0.2.3 lib/barometer/extensions/httparty.rb
attack-barometer-0.3.1 lib/barometer/extensions/httparty.rb
attack-barometer-0.3.2 lib/barometer/extensions/httparty.rb
attack-barometer-0.5.0 lib/barometer/extensions/httparty.rb
attack-barometer-0.6.0 lib/barometer/extensions/httparty.rb
attack-barometer-0.6.1 lib/barometer/extensions/httparty.rb
barometer-0.6.7 lib/barometer/extensions/httparty.rb
barometer-0.6.6 lib/barometer/extensions/httparty.rb
barometer-0.6.4 lib/barometer/extensions/httparty.rb
barometer-0.1.0 lib/barometer/extensions/httparty.rb
barometer-0.6.1 lib/barometer/extensions/httparty.rb
barometer-0.3.1 lib/barometer/extensions/httparty.rb
barometer-0.5.0 lib/barometer/extensions/httparty.rb
barometer-0.6.2 lib/barometer/extensions/httparty.rb
barometer-0.2.2 lib/barometer/extensions/httparty.rb
barometer-0.2.3 lib/barometer/extensions/httparty.rb
barometer-0.3.2 lib/barometer/extensions/httparty.rb
barometer-0.2.1 lib/barometer/extensions/httparty.rb
barometer-0.6.3 lib/barometer/extensions/httparty.rb