Function get_status

Source
pub fn get_status(host: &str) -> Result<StatusCode, Box<dyn Error>>
Expand description

Checks the status of host url from a GET request

§Arguments

  • host - the full URL to check -> eg.. "http://localhost:3000"

§Returns

  • Ok(StatusCode) if the request was successfully sent, containing the resulting status code
  • Err if the request fails to send. This is not reflective of the status code