diff --git a/examples/cookies/cookies.zig b/examples/cookies/cookies.zig index 27c6023..efb5da2 100644 --- a/examples/cookies/cookies.zig +++ b/examples/cookies/cookies.zig @@ -11,7 +11,7 @@ fn makeRequest(a: std.mem.Allocator, url: []const u8) !void { var http_client: std.http.Client = .{ .allocator = a }; defer http_client.deinit(); - var result = try http_client.fetch(a,.{ + var result = try http_client.fetch(a, .{ .method = .GET, .location = .{ .uri = uri, diff --git a/examples/http_params/http_params.zig b/examples/http_params/http_params.zig index 8f0ed6f..6147aa2 100644 --- a/examples/http_params/http_params.zig +++ b/examples/http_params/http_params.zig @@ -11,7 +11,7 @@ fn makeRequest(a: std.mem.Allocator, url: []const u8) !void { var http_client: std.http.Client = .{ .allocator = a }; defer http_client.deinit(); - var result = try http_client.fetch(a,.{ + var result = try http_client.fetch(a, .{ .method = .GET, .location = .{ .uri = uri, diff --git a/facil.io/build.zig.zon b/facil.io/build.zig.zon index 277ebf3..3ed7ce9 100644 --- a/facil.io/build.zig.zon +++ b/facil.io/build.zig.zon @@ -2,4 +2,3 @@ .name = "facil.io", .version = "0.0.12", } - diff --git a/src/tests/test_auth.zig b/src/tests/test_auth.zig index 9bc321c..d698c5e 100644 --- a/src/tests/test_auth.zig +++ b/src/tests/test_auth.zig @@ -146,7 +146,7 @@ fn makeRequest(a: std.mem.Allocator, url: []const u8, auth: ?ClientAuthReqHeader var http_client: std.http.Client = .{ .allocator = a }; defer http_client.deinit(); - var result = try http_client.fetch(a,.{ + var result = try http_client.fetch(a, .{ .location = .{ .uri = uri, }, @@ -157,7 +157,7 @@ fn makeRequest(a: std.mem.Allocator, url: []const u8, auth: ?ClientAuthReqHeader // might have to do with connection pooling and connections being in // a different state when all data has been read?!? { - if(result.body)|body|{ + if (result.body) |body| { std.debug.print("RESPONSE:\n{s}\n", .{body[0..]}); } } diff --git a/src/tests/test_http_params.zig b/src/tests/test_http_params.zig index c5dd21a..b132307 100644 --- a/src/tests/test_http_params.zig +++ b/src/tests/test_http_params.zig @@ -10,10 +10,10 @@ fn makeRequest(a: std.mem.Allocator, url: []const u8) !void { var http_client: std.http.Client = .{ .allocator = a }; defer http_client.deinit(); - var result = try http_client.fetch(a,.{ + var result = try http_client.fetch(a, .{ .method = .GET, .location = .{ - .uri = uri, + .uri = uri, }, .headers = h, }); diff --git a/src/tests/test_sendfile.zig b/src/tests/test_sendfile.zig index df07ed5..0bfa6f1 100644 --- a/src/tests/test_sendfile.zig +++ b/src/tests/test_sendfile.zig @@ -15,7 +15,7 @@ fn makeRequest(a: std.mem.Allocator, url: []const u8) !void { var http_client: std.http.Client = .{ .allocator = a }; defer http_client.deinit(); - var result = try http_client.fetch(a,.{ + var result = try http_client.fetch(a, .{ .method = .GET, .location = .{ .uri = uri, @@ -24,9 +24,9 @@ fn makeRequest(a: std.mem.Allocator, url: []const u8) !void { }); defer result.deinit(); - if(result.body)|body|{ + if (result.body) |body| { read_len = body.len; - std.mem.copyForwards(u8,&buffer,body); + std.mem.copyForwards(u8, &buffer, body); } zap.stop(); } diff --git a/tools/announceybot.zig b/tools/announceybot.zig index 5443183..a5cbfa6 100644 --- a/tools/announceybot.zig +++ b/tools/announceybot.zig @@ -160,7 +160,7 @@ fn sendToDiscordPart(allocator: std.mem.Allocator, url: []const u8, message_json var http_client: std.http.Client = .{ .allocator = allocator }; defer http_client.deinit(); - var result = try http_client.fetch(allocator,.{ + var result = try http_client.fetch(allocator, .{ .method = .POST, .location = .{ .uri = uri,