Skip to content

Commit

Permalink
fix test-httpparams (std.http use)
Browse files Browse the repository at this point in the history
  • Loading branch information
renerocksai committed Apr 21, 2024
1 parent 90c544d commit 0e43f56
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/tests/test_http_params.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@ const std = @import("std");
const zap = @import("zap");

fn makeRequest(a: std.mem.Allocator, url: []const u8) !void {
const uri = try std.Uri.parse(url);

var h = std.http.Headers{ .allocator = a };
defer h.deinit();

var http_client: std.http.Client = .{ .allocator = a };
defer http_client.deinit();

var req = try http_client.open(.GET, uri, h, .{});
defer req.deinit();
_ = try http_client.fetch(.{
.location = .{ .url = url },
});

try req.send(.{});
try req.wait();
zap.stop();
}

Expand Down

0 comments on commit 0e43f56

Please sign in to comment.