Merge pull request #1150 from Techatrix/gen-data-files

update config gen according to new `std.http` changes
This commit is contained in:
Lee Cannon 2023-04-24 14:58:52 +01:00 committed by GitHub
commit d4bc2c2349
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -964,15 +964,16 @@ fn httpGET(allocator: std.mem.Allocator, uri: std.Uri) !Response {
defer client.deinit();
try client.ca_bundle.rescan(allocator);
var request = try client.request(uri, .{ .connection = .close }, .{});
var request = try client.request(.GET, uri, .{ .allocator = allocator }, .{});
defer request.deinit();
try request.do();
try request.start();
// try request.finish();
try request.do();
if (request.response.headers.status.class() != .success) {
if (request.response.status.class() != .success) {
return .{
.other = request.response.headers.status,
.other = request.response.status,
};
}