MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / get_request

Method get_request

rake_tasks/common.rb:139–147  ·  view source on GitHub ↗

Takes a url or a prepared request, so callers needing headers can build their own.

(target)

Source from the content-addressed store, hash-verified

137
138 # Takes a url or a prepared request, so callers needing headers can build their own.
139 def self.get_request(target)
140 request = target.is_a?(Net::HTTPRequest) ? target : Net::HTTP::Get.new(URI(target))
141 uri = request.uri
142
143 Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https',
144 open_timeout: 10, read_timeout: 60) do |http|
145 http.request(request)
146 end
147 end
148
149 def self.verify_package_published(url, timeout: 300)
150 puts "Verifying #{url}..."

Callers

nothing calls this directly

Calls 6

startMethod · 0.65
newMethod · 0.45
uriMethod · 0.45
hostnameMethod · 0.45
portMethod · 0.45
requestMethod · 0.45

Tested by

no test coverage detected