Skip to content
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 #set_debug_output #unlock also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0