Skip to content

mattn/zig-curl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zig-curl

cURL binding for Zig

Usage

var allocator = std.heap.page_allocator;
var f = struct {
    fn f(data: []const u8) anyerror!usize {
        try std.io.getStdOut().writeAll(data);
        return data.len;
    }
}.f;
var res = try curl.get("https://google.com/", .{ .allocator = allocator, .cb = f });
if (res != 0) {
    var msg = try curl.strerrorAlloc(allocator, res);
    defer allocator.free(msg);
    std.log.warn("{s}", .{msg});
}

Requirements

  • libcurl

Installation

$ zig build

License

MIT

Author

Yasuhiro Matsumoto (a.k.a. mattn)

About

cURL binding for Zig

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages