curl 0.4.45

Rust bindings to libcurl for making HTTP requests
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use curl::easy::Easy;

pub extern "C" fn hook() {
    let mut easy = Easy::new();
    easy.url("google.com").unwrap();
    easy.write_function(|data| Ok(data.len())).unwrap();
    easy.perform().unwrap();
}

fn main() {
    curl::init();
    hook();
    unsafe {
        libc::atexit(hook);
    }
    println!("Finishing...")
}