[][src]Function rubric::helpers::web::site_responds

pub fn site_responds(url: &str) -> bool

Just calls get and asserts that the response was successful. Just saves a few lines of code.


let url = "https://postman-echo.com/get";
assert!(web::site_responds(url));

let bad_url = "https://probablynotawebsite.com/";
assert!(!web::site_responds(bad_url));