bool hasPort

Returns whether the URI has an explicit port.

If the port number is the default port number (zero for unrecognized schemes, with http (80) and https (443) being recognized), then the port is made implicit and omitted from the URI.

Source

bool get hasPort;