def request
import emerging-ezhttp@0.21.0.0/src/http.bend as Httpimport Base
647# a request-line and headers (RFC 9112 §3, §5). Absolute-path request-target
648# (RFC 9112 §3.2.1); the fields are request.fields'.
649def request(method: String, host: String, path: String,
650 headers: List<&2, Header>, +body: String) -> String:
651 method ++ " " ++ path ++ " HTTP/1.1\r\n"
652 ++ headers.lines(request.fields(host, headers, body))
653 ++ "\r\n"
654 ++ body