def host_field
import bend-net-url@0.4.0.0/url.bend as Urlimport Base
383# RFC 9110 §7.2: the Host field; the default port may be left out.
384def host_field(a: Abs) -> String:
385 Abs{+scheme, +host, +port, target} = a
386 Bool.pick(String, U32.is_eq(port, abs.port.dflt(default_port(scheme))), host, host ++ ":" ++ U32.show(port))
Uses (8)
Used by (0)
No other definition uses this definition.