def path.of
import emerging-ezhttp@0.21.0.0/src/url.bend as Urlimport Base
52# the path a url asked for, "/" when it named none. The leading slash ended
53# the authority, so it is put back. Absolute-path form matches RFC 3986
54# path-absolute / path-abempty used with an authority (§3.3).
55def path.of(ps: List<&2, String>) -> String:
56 match ps:
57 case []:
58 "/"
59 case h <> t:
60 "/" ++ String.join(t, "/")