URI.hostUnicode

string hostUnicode() const @safe

Return the Unicode form of the host using IDNA ToUnicode (if applicable). If the host is an IP-literal, it is returned as-is.

Returns

The Unicode host when applicable; otherwise the host as stored.

Throws

Exception if Punycode/IDNA decoding fails.