class method
Net::HTTPSession.get_print
Net::HTTP.get_print(hostname, path, port = 80) → nil
Net::HTTP:get_print(uri, headers = {}, port = uri.port) → nil
lib/net/http.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/net/http.rb, line 763
def HTTP.get_print(uri_or_host, path_or_headers = nil, port = nil)
get_response(uri_or_host, path_or_headers, port) {|res|
res.read_body do |chunk|
$stdout.print chunk
end
}
nil
end
Like Net::HTTP.get, but writes the returned body to $stdout; returns nil.