instance method
Gem::RemoteFetcher#request
request(uri, request_class, last_modified = nil) { |req| ... }
lib/rubygems/remote_fetcher.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/rubygems/remote_fetcher.rb, line 315
def request(uri, request_class, last_modified = nil)
proxy = proxy_for @proxy, uri
pool = pools_for(proxy).pool_for uri
request = Gem::Request.new uri, request_class, last_modified, pool
request.fetch do |req|
yield req if block_given?
end
end
Performs a Gem::Net::HTTP request of type request_class on uri returning a Gem::Net::HTTP response object. request maintains a table of persistent connections to reduce connect overhead.