use_ssl=(flag)
public
Turn on/off SSL. This flag must be set before starting session. If you
change use_ssl value after session
started, a Net::HTTP object raises IOError.
Show source
def use_ssl=(flag)
flag = (flag ? true : false)
raise IOError, "use_ssl value changed, but session already started" \
if started? and @use_ssl != flag
if flag and not @ssl_context
@ssl_context = OpenSSL::SSL::SSLContext.new
end
@use_ssl = flag
end