hostname()
Instance Public methods
extract the host part of the URI and unwrap brackets for IPv6 addresses.
This method is same as #host except brackets for IPv6 (andn future IP) addresses are removed.
u = URI(âhttp://[::1]/barâ) p u.hostname #=> â::1â p u.host #=> â[::1]â
Please login to continue.