Skip to content

thekashifmalik/rust-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTP Library for Rust

A simple HTTP library for rust. Because learning.

extern crate http;


fn main() {

    let response = match http::get("http://www.google.com") {
        Ok(resp) => resp,
        _        => panic!("There was a problem making the request"),
    };

    if response.status_code as int == 200 {
        println!("Time according to Google: {}", response.headers.get("date"))
    }
}

About

HTTP library for Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published