Sha256: 6c4a387d2f22464b558566b05cbee6560dbe44b0b08feaa220465ae420c97bc5

Contents?: true

Size: 819 Bytes

Versions: 77

Compression:

Stored size: 819 Bytes

Contents

require 'net/http/persistent'

module Selenium
  module WebDriver
    module Remote
      module Http

        # @api private
        class Persistent < Default

          def close
            @http.shutdown if @http
          end

          private

          def new_http_client
            proxy = nil

            if @proxy
              unless @proxy.respond_to?(:http) && url = @proxy.http
                raise Error::WebDriverError, "expected HTTP proxy, got #{@proxy.inspect}"
              end
              proxy = URI.parse(url)
            end

            Net::HTTP::Persistent.new "webdriver", proxy
          end

          def response_for(request)
            http.request server_url, request
          end

        end # Persistent
      end # Http
    end # Remote
  end # WebDriver
end # Selenium

Version data entries

77 entries across 77 versions & 5 rubygems

Version Path
selenium-webdriver-2.45.0 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.45.0.dev3 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.45.0.dev2 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.45.0.dev lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.44.0 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.44.0.dev lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.43.0 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.42.0 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.41.0 lib/selenium/webdriver/remote/http/persistent.rb
browserstack-webdriver-2.40.1 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.40.0 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.40.0.rc2 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.40.0.rc1 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.39.0 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.38.0 lib/selenium/webdriver/remote/http/persistent.rb
browserstack-webdriver-0.0.22 lib/selenium/webdriver/remote/http/persistent.rb
browserstack-webdriver-0.0.1 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.37.0 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.35.1 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.35.0 lib/selenium/webdriver/remote/http/persistent.rb