Http.Http.render: def of bend-kube-runtime@0.2.0.0 Import: import bend-kube-runtime@0.2.0.0/src/http.bend as Http Lines 86-93 of bend-kube-runtime@0.2.0.0/src/http.bend: https://jend.leeeet.dev/read.txt?path=bend-kube-runtime@0.2.0.0/src/http.bend&start_line=86&end_line=93 import Base import bend-kube-runtime@0.2.0.0/src/utf8.bend as U # The request's bytes, as text: a Host header, the given headers, and a # Content-Length that counts the body's UTF-8 bytes. def Http.render(req: Req, host: String) -> String: match req: case Req{m, p, hs, +body}: m ++ " " ++ p ++ " HTTP/1.1\r\nHost: " ++ host ++ "\r\n" ++ Http.render_headers(hs) ++ "Content-Length: " ++ U32.show(U.Utf8.size(body)) ++ "\r\n\r\n" ++ body Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.show https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/http.bend&name=Http.render_headers https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/http.bend&name=Req https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/utf8.bend&name=Utf8.size