def Serve.reply

bend-kube-runtime@0.2.0.0 · src/serve.bend:35

import bend-kube-runtime@0.2.0.0/src/serve.bend as Serve
import Base

35def Serve.reply(+code: U32, ctype: String, +body: String) -> String:
36  "HTTP/1.1 " ++ U32.show(code) ++ " " ++ Serve.reason(code) ++ "\r\nContent-Type: " ++ ctype
37    ++ "\r\nContent-Length: " ++ U32.show(Serve.size(body)) ++ "\r\nConnection: close\r\n\r\n"
38    ++ body

Uses (6)

Used by (3)