Skip to main content

UrlHostParts

This class represents the individual components of a URL's host section, including the username, password, host address, and port number. It serves as a structured container for managing and accessing authentication credentials and network location details within a URL.

Attributes

AttributeTypeDescription
usernamestringThe authentication username extracted from the URL's user information component.
passwordstringThe authentication password associated with the username in the URL's user information component.
hoststringThe domain name or IP address identifying the network host in the URL.
portintegerThe explicit network port number specified in the URL, constrained to a 16-bit unsigned integer.

Constructor

Signature

def UrlHostParts(
username: Optional[str] = None,
password: Optional[str] = None,
host: Optional[str] = None,
port: Optional[int] = None
) - > null

Parameters

NameTypeDescription
usernameOptional[str] = NoneThe username component of the URL host.
passwordOptional[str] = NoneThe password component of the URL host.
hostOptional[str] = NoneThe host name or IP address.
portOptional[int] = NoneThe port number.

Signature

def UrlHostParts(
username: Optional[str] = None,
password: Optional[str] = None,
host: Optional[str] = None,
port: Optional[int] = None
) - > null

Parameters

NameTypeDescription
usernameOptional[str] = NoneThe authentication username extracted from the URL authority section
passwordOptional[str] = NoneThe authentication password associated with the username
hostOptional[str] = NoneThe domain name or IP address of the target server
portOptional[int] = NoneThe network port number, constrained to the 0-65535 range