class method
Net::HTTP.get_print
(::URI::Generic uri, ?::Net::headers header) -> void
(::String host, ::String path, ?::Integer port) -> void
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.
See also
.get
.get_response
.default_port
.http_default_port
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0