Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Net::HTTP#finish
finish
lib/net/http.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/net/http.rb, line 1708
def finish
raise IOError, 'HTTP session not yet started' unless started?
do_finish
end
Finishes the HTTP session:
Example
http = Net::HTTP.new(hostname) http.start http.started? # => true http.finish # => nil http.started? # => false
Raises IOError if not in a session.