main::helpers::general

Function check_status_code

source
pub async fn check_status_code(client: &Client, url: &str) -> Result<u16, Error>
Expand description

Checks the HTTP status code of a URL using the provided client.

§Arguments

  • client: The reqwest::Client used to make the request.
  • url: The URL to send the GET request to.

§Returns

The HTTP status code of the response.