Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Net::HTTP#use_ssl=
use_ssl=(flag)
lib/net/http.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/net/http.rb, line 1435
def use_ssl=(flag)
flag = flag ? true : false
if started? and @use_ssl != flag
raise IOError, "use_ssl value changed, but session already started"
end
@use_ssl = flag
end
Sets whether a new session is to use Transport Layer Security:
Raises IOError if attempting to change during a session.
Raises OpenSSL::SSL::SSLError if the port is not an HTTPS port.