From f7d30b2367186bb7ac51cc55e25968626a9f39a4 Mon Sep 17 00:00:00 2001 From: melonedo <44501064+melonedo@users.noreply.github.com> Date: Thu, 18 Apr 2024 10:29:24 +0800 Subject: [PATCH] Update readme and examples --- readme.md | 4 ++-- src/example.zig | 2 +- src/tests.zig | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 78d6bb0..e9f1153 100644 --- a/readme.md +++ b/readme.md @@ -40,7 +40,7 @@ const HttpClient = @import("tls12"); ## Example -This is tested againt zig version `0.12.0-dev.3518+d2be725e4`. Zig's HTTP interface has changed so it DOES NOT WORK on 0.11 and below. +This is tested againt zig version `0.12.0-dev.3674+a0de07760`. Zig's HTTP interface has changed so it DOES NOT WORK on 0.11 and below. ```zig const std = @import("std"); @@ -67,7 +67,7 @@ pub fn main() !void { }); defer req.deinit(); - try req.send(.{}); + try req.send(); try req.wait(); const body = try req.reader().readAllAlloc(allocator, 16 * 1024 * 1024); defer allocator.free(body); diff --git a/src/example.zig b/src/example.zig index 80f6b36..801dff8 100644 --- a/src/example.zig +++ b/src/example.zig @@ -22,7 +22,7 @@ pub fn main() !void { }); defer req.deinit(); - try req.send(.{}); + try req.send(); try req.wait(); const body = try req.reader().readAllAlloc(allocator, 16 * 1024 * 1024); defer allocator.free(body); diff --git a/src/tests.zig b/src/tests.zig index 7c910e6..ac1cf20 100644 --- a/src/tests.zig +++ b/src/tests.zig @@ -21,7 +21,7 @@ test "Connect https" { // The rest of a request lifecycle can be skipped for testing - try req.send(.{}); + try req.send(); try req.wait(); const body = try req.reader().readAllAlloc(allocator, 16 * 1024 * 1024); defer allocator.free(body);