| ... | ... | @@ -68,7 +68,8 @@ pub fn server_fetch(url: string) !json.Document { |
| 68 | 68 | try req.sendBodiless(); |
| 69 | 69 | var resp = try req.receiveHead(&.{}); |
| 70 | 70 | if (resp.head.status != .ok) u.fail("expected: 200 from '{s}' got: {s}", .{ url, @tagName(resp.head.status) }); |
| 71 | | return json.parse(gpa, "", nio.AnyReadable.fromStd(resp.reader(&buf)), .{ .support_trailing_commas = true, .maximum_depth = 100 }); |
| 71 | const content = try resp.reader(&buf).allocRemaining(gpa, .limited(1024 * 1024 * 5)); |
| 72 | return json.parseFromSlice(gpa, "", content, .{ .support_trailing_commas = true, .maximum_depth = 100 }); |
| 72 | 73 | } |
| 73 | 74 | |
| 74 | 75 | pub fn server_fetchArray(url: string) ![]const Package { |