From 5fd5ae067759f53c18675e1cb365111242736ff1 Mon Sep 17 00:00:00 2001 From: Techatrix <19954306+Techatrix@users.noreply.github.com> Date: Sun, 23 Apr 2023 19:10:11 +0200 Subject: [PATCH] update config gen according to new `std.http` changes --- src/config_gen/config_gen.zig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/config_gen/config_gen.zig b/src/config_gen/config_gen.zig index 30a5393..9980c89 100644 --- a/src/config_gen/config_gen.zig +++ b/src/config_gen/config_gen.zig @@ -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, }; }