[−][src]Function clean_url::return_url
pub async fn return_url(url: String) -> Option<String>
Returns a clean URL that has a 200 series status code
Usage:
use clean_url::return_url; use tokio_test::block_on; assert_eq!(block_on(return_url(String::from("httpbin.org/status/200"))), Some(String::from("https://httpbin.org/status/200"))); assert_eq!(block_on(return_url(String::from("example.com"))), Some(String::from("https://example.com/")));