mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
[fetch] Support Transfer-Encoding: chunked
This commit is contained in:
@@ -165,14 +165,17 @@ pub fn main() anyerror!void {
|
||||
var body_out_str = try MutableString.init(default_allocator, 1024);
|
||||
var response = try client.send(args.body, &body_out_str);
|
||||
|
||||
Output.flush();
|
||||
Output.disableBuffering();
|
||||
try Output.writer().writeAll(body_out_str.list.items);
|
||||
|
||||
Output.enableBuffering();
|
||||
switch (response.status_code) {
|
||||
200, 302 => {},
|
||||
else => {
|
||||
if (!client.verbose) {
|
||||
Output.prettyErrorln("Response: {}", .{response});
|
||||
// Output.flush();
|
||||
|
||||
// Output.prettyErrorln("Response: {}", .{response});
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user