def ask.short
import emerging-ezhttp@0.22.0.0/src/http.bend as Httpimport Base
1116# request body against Content-Length
1117def ask.short(method: String, target: String, headers: List<&2, Header>,
1118 n: Nat, body: String, short: Bool) -> Request:
1119 match short:
1120 case True{}:
1121 Bad{"the request body stopped before its Content-Length"}
1122 case False{}:
1123 Request{method, target, headers, octs.take(body, n)}