Skip to content

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

class method

Net::HTTPSession.default_port

default_port

Returns integer 80, the default port to use for HTTP requests:

Example
Net::HTTP.default_port # => 80
See also .get .get_print also in 4.1 · 4.0