Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Net::HTTPSession.https_default_port
https_default_port
lib/net/http.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/net/http.rb, line 955
def HTTP.https_default_port
443
end
Returns integer 443, the default port to use for HTTPS requests:
Example
Net::HTTP.https_default_port # => 443