Skip to content

Commit

Permalink
Update readme and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
melonedo committed Apr 18, 2024
1 parent ea5f5d3 commit f7d30b2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/example.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/tests.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f7d30b2

Please sign in to comment.