Function sendBodyComplete [src]
Transfers the HTTP head and body over the connection and flushes.
Prototype
pub fn sendBodyComplete(r: *Request, body: []u8) Writer.Error!void
Parameters
r: *Request
body: []u8
Source
pub fn sendBodyComplete(r: *Request, body: []u8) Writer.Error!void {
r.transfer_encoding = .{ .content_length = body.len };
var bw = try sendBodyUnflushed(r, body);
bw.writer.end = body.len;
try bw.end();
try r.connection.?.flush();
}