Committed some changes
parent
1f1dfed0a4
commit
8af3252278
|
@ -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
|
|
@ -0,0 +1,8 @@
|
||||||
|
[package]
|
||||||
|
name = "drm"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["Joey Hines <joey@ahines.net>"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
reqwest = "0.9.16"
|
|
@ -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(())
|
||||||
|
}
|
Loading…
Reference in New Issue