Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Net::HTTP#started?

() -> bool
started?

Returns true if the HTTP session has been started:

Example
http = Net::HTTP.new(hostname)
http.started? # => false
http.start
http.started? # => true
http.finish # => nil
http.started? # => false

Net::HTTP.start(hostname) do |http|
  http.started?
end # => true
http.started? # => false
See also #start #trace #sspi_auth? #transport_request also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0