Skip to content
This repository was archived by the owner on Nov 11, 2023. It is now read-only.

http-client test program #22

Merged
merged 2 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions http-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ permalink: /http-client
```zig
const std = @import("std");

const uri = std.Uri.parse("https://ziglang.org") catch unreachable;
const uri = std.Uri.parse("https://ziglang.org/") catch unreachable;

test {
var client = std.http.Client{ .allocator = std.testing.allocator };
defer client.deinit(std.testing.allocator);
var client: std.http.Client = .{ .allocator = std.testing.allocator };
defer client.deinit();

var req = try client.request(uri, .{}, .{});
defer req.deinit();
Expand Down
6 changes: 3 additions & 3 deletions src/http-client.zig
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const std = @import("std");

const uri = std.Uri.parse("https://ziglang.org") catch unreachable;
const uri = std.Uri.parse("https://ziglang.org/") catch unreachable;

test {
var client = std.http.Client{ .allocator = std.testing.allocator };
defer client.deinit(std.testing.allocator);
var client: std.http.Client = .{ .allocator = std.testing.allocator };
defer client.deinit();

var req = try client.request(uri, .{}, .{});
defer req.deinit();
Expand Down