def redirect.target.of
import emerging-ezhttp@0.21.0.0/src/redirect.bend as Redirectimport Base
import emerging-ezhttp@0.21.0.0/src/url.bend as Url
256# a Location once it is known whether it is an absolute URL
257def redirect.target.of(url: String, +loc: String, absolute: Bool)
258 -> Maybe<&2, String>:
259 match absolute:
260 case True{}:
261 Some{loc}
262 case False{}:
263 redirect.at(Url.parse(url), loc)