Committed some changes

master
Joey Hines 2019-05-05 09:42:14 -05:00
parent 1f1dfed0a4
commit 8af3252278
3 changed files with 34 additions and 1 deletions

4
.gitignore vendored
View File

@ -6,4 +6,6 @@ CMakeLists.txt
/venv/* /venv/*
*.zip *.zip
/jasmin-2.4/* /jasmin-2.4/*
hash.txt hash.txt
/drm/target/*
/drm/Cargo.lock

8
drm/Cargo.toml 100644
View File

@ -0,0 +1,8 @@
[package]
name = "drm"
version = "0.1.0"
authors = ["Joey Hines <joey@ahines.net>"]
edition = "2018"
[dependencies]
reqwest = "0.9.16"

23
drm/src/main.rs 100644
View File

@ -0,0 +1,23 @@
extern crate reqwest;
use reqwest::Error;
use std::time::Duration;
use reqwest::ClientBuilder;
fn main() -> Result<(), Error> {
let request_url = "https://www.ea.com";
println!("{}", request_url);
let timeout = Duration::new(5, 0);
let client = ClientBuilder::new().timeout(timeout).build()?;
let response = client.head(request_url).send()?;
if response.status().is_success() {
println!("ea found");
} else {
println!("ea not found");
}
Ok(())
}