instance method
Net::HTTPSession#finish
finish
lib/net/http.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/net/http.rb, line 1648
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.