this should work but does not
This commit is contained in:
parent
7f43050436
commit
aaaf9cd664
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
.gyro/
|
.gyro/
|
||||||
zig-cache/
|
zig-cache/
|
||||||
zig-out/
|
zig-out/
|
||||||
|
deps.zig
|
||||||
|
|
28
deps.zig
28
deps.zig
|
@ -1,8 +1,32 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
pub const pkgs = struct {
|
pub const pkgs = struct {
|
||||||
pub const http = std.build.Pkg{
|
pub const requestz = std.build.Pkg{
|
||||||
|
.name = "requestz",
|
||||||
|
.path = .{ .path = ".gyro/requestz-ducdetronquito-0.1.1-68845cbcc0c07d54a8cd287ad333ba84/pkg/src/main.zig" },
|
||||||
|
.dependencies = &[_]std.build.Pkg{
|
||||||
|
std.build.Pkg{
|
||||||
.name = "http",
|
.name = "http",
|
||||||
.path = .{ .path = ".gyro/http-ducdetronquito-0.1.3-02dd386aa7452ba02887b98078627854/pkg/src/main.zig" },
|
.path = .{ .path = ".gyro/http-ducdetronquito-0.1.3-02dd386aa7452ba02887b98078627854/pkg/src/main.zig" },
|
||||||
|
},
|
||||||
|
std.build.Pkg{
|
||||||
|
.name = "h11",
|
||||||
|
.path = .{ .path = ".gyro/h11-ducdetronquito-0.1.1-5d7aa65ac782877d98cc6311a77ca7a8/pkg/src/main.zig" },
|
||||||
|
.dependencies = &[_]std.build.Pkg{
|
||||||
|
std.build.Pkg{
|
||||||
|
.name = "http",
|
||||||
|
.path = .{ .path = ".gyro/http-ducdetronquito-0.1.3-02dd386aa7452ba02887b98078627854/pkg/src/main.zig" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
std.build.Pkg{
|
||||||
|
.name = "iguanaTLS",
|
||||||
|
.path = .{ .path = ".gyro/iguanaTLS-alexnask-0d39a361639ad5469f8e4dcdaea35446bbe54b48/pkg/src/main.zig" },
|
||||||
|
},
|
||||||
|
std.build.Pkg{
|
||||||
|
.name = "network",
|
||||||
|
.path = .{ .path = ".gyro/zig-network-MasterQ32-b9c91769d8ebd626c8e45b2abb05cbc28ccc50da/pkg/network.zig" },
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn addAllTo(artifact: *std.build.LibExeObjStep) void {
|
pub fn addAllTo(artifact: *std.build.LibExeObjStep) void {
|
||||||
|
@ -18,5 +42,5 @@ pub const pkgs = struct {
|
||||||
pub const exports = struct {
|
pub const exports = struct {
|
||||||
};
|
};
|
||||||
pub const base_dirs = struct {
|
pub const base_dirs = struct {
|
||||||
pub const http = ".gyro/http-ducdetronquito-0.1.3-02dd386aa7452ba02887b98078627854/pkg";
|
pub const requestz = ".gyro/requestz-ducdetronquito-0.1.1-68845cbcc0c07d54a8cd287ad333ba84/pkg";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1 +1,5 @@
|
||||||
pkg default ducdetronquito http 0.1.3
|
pkg default ducdetronquito http 0.1.3
|
||||||
|
pkg default ducdetronquito requestz 0.1.1
|
||||||
|
pkg default ducdetronquito h11 0.1.1
|
||||||
|
github alexnask iguanaTLS 0d39a361639ad5469f8e4dcdaea35446bbe54b48 src/main.zig 0d39a361639ad5469f8e4dcdaea35446bbe54b48
|
||||||
|
github MasterQ32 zig-network b9c91769d8ebd626c8e45b2abb05cbc28ccc50da network.zig b9c91769d8ebd626c8e45b2abb05cbc28ccc50da
|
||||||
|
|
2
gyro.zzz
2
gyro.zzz
|
@ -1,2 +1,2 @@
|
||||||
deps:
|
deps:
|
||||||
ducdetronquito/http: ^0.1.3
|
ducdetronquito/requestz: ^0.1.1
|
||||||
|
|
12
src/main.zig
12
src/main.zig
|
@ -1,5 +1,15 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
|
const requestz = @import("requestz");
|
||||||
|
|
||||||
pub fn main() anyerror!void {
|
pub fn main() anyerror!void {
|
||||||
std.log.info("All your codebase are belong to us.", .{});
|
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
defer _ = gpa.deinit();
|
||||||
|
const allocator = &gpa.allocator;
|
||||||
|
|
||||||
|
var client = try requestz.Client.init(allocator);
|
||||||
|
defer client.deinit();
|
||||||
|
|
||||||
|
var response = try client.get("http://httpbin.org/get", .{});
|
||||||
|
std.log.info("{s}", .{response.body});
|
||||||
|
defer response.deinit();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user