Url.host_field: def of bend-net-url@0.4.0.0 Import: import bend-net-url@0.4.0.0/url.bend as Url Lines 383-386 of bend-net-url@0.4.0.0/url.bend: https://jend.leeeet.dev/read.txt?path=bend-net-url@0.4.0.0/url.bend&start_line=383&end_line=386 import Base # RFC 9110 ยง7.2: the Host field; the default port may be left out. def host_field(a: Abs) -> String: Abs{+scheme, +host, +port, target} = a Bool.pick(String, U32.is_eq(port, abs.port.dflt(default_port(scheme))), host, host ++ ":" ++ U32.show(port)) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.show https://jend.leeeet.dev/definition.txt?path=bend-net-url@0.4.0.0/url.bend&name=Abs https://jend.leeeet.dev/definition.txt?path=bend-net-url@0.4.0.0/url.bend&name=abs.port.dflt https://jend.leeeet.dev/definition.txt?path=bend-net-url@0.4.0.0/url.bend&name=default_port