Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const std = @import("std");
- const warn = std.debug.warn;
- const c = @cImport({
- @cInclude("curl/curl.h");
- });
- pub fn main() void {
- const curl = c.curl_easy_init();
- var res: c.CURLcode = undefined;
- _ = c.curl_easy_setopt(curl, @intToEnum(c.CURLoption, c.CURLOPT_URL), c"http://example.com");
- res = c.curl_easy_perform(curl);
- c.curl_easy_cleanup(curl);
- warn("{}\n", res);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement