def redirect.next
import emerging-ezhttp@0.21.0.0/src/redirect.bend as Redirectimport Base
286# the next hop from `url`, after a response with `status` and Location `loc`
287# ("" when it had none), with `left` hops still allowed
288def redirect.next(left: Nat, url: String, +status: U32, +loc: String) -> Hop:
289 match left:
290 case 0n:
291 Stop{}
292 case 1n+p:
293 redirect.on(url, loc, redirect.is(status))