Http.redirect.to: def of bend-kit-http@0.38.2.0 Import: import bend-kit-http@0.38.2.0/http.bend as Http Lines 1787-1793 of bend-kit-http@0.38.2.0/http.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-http@0.38.2.0/http.bend&start_line=1787&end_line=1793 import Base import bend-kit-url@0.4.1.0/url.bend as Url import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes def redirect.to(+status: U32, +method: String, +from: Url.Abs, headers: Map<&2, List<&2, String>>, body: Bytes.Bytes, next: Maybe<&2, Url.Abs>) -> Maybe<&1, Hop>: match next: case None{}: None{} case Some{+to}: +drop = Bool.or(Bool.and(U32.is_eq(status, 303), Bool.not(String.eq(method, "HEAD"))), Bool.and(Bool.or(U32.is_eq(status, 301), U32.is_eq(status, 302)), String.eq(method, "POST"))) Some{Hop{Bool.pick(String, drop, "GET", method), to, redirect.hdrs(headers, drop, Bool.not(String.eq(redirect.origin(from), redirect.origin(to)))), redirect.body(drop, body)}} Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Hop https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=redirect.body https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=redirect.hdrs https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=redirect.origin https://jend.leeeet.dev/definition.txt?path=bend-kit-url@0.4.1.0/url.bend&name=Abs