Skip to content

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

instance method

Net::HTTPSession#use_ssl=

use_ssl=(flag)

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.