pub async fn logged_request(url: &Url, handles: Arc<Handles>) -> Result<Response> {
    let client = &handles.config.client;
    let level = handles.config.output_level;
    let tx_stats = handles.stats.tx.clone();

    let response = make_request(client, url, level, &handles.config, tx_stats).await;

    let scans = handles.ferox_scans()?;

    match response {
        Ok(resp) => {
            match resp.status() {
                StatusCode::TOO_MANY_REQUESTS | StatusCode::FORBIDDEN => {
                    scans.increment_status_code(url.as_str(), resp.status());
                }
                _ => {}
            }
            Ok(resp)
        }
        Err(e) => {
            log::warn!("err: {:?}", e);
            scans.increment_error(url.as_str());
            bail!(e)
        }
    }
}
/// wrapper for make_request used to pass error/response codes to FeroxScans for per-scan stats
/// tracking of information related to auto-tune/bail
wrapper for make_request used to pass error/response codes to FeroxScans for per-scan stats
tracking of information related to auto-tune/bail
wrapper for make_request used to pass error / response codes to FeroxScans for per - scan stats tracking of information related to auto - tune / bail
pub async fn logged_request(url: &Url, handles: Arc<Handles>) -> Result<Response> {
    let client = &handles.config.client;
    let level = handles.config.output_level;
    let tx_stats = handles.stats.tx.clone();
    let response = make_request(client, url, level, &handles.config, tx_stats).await;
    let scans = handles.ferox_scans()?;
    match response {
        Ok(resp) => {
            match resp.status() {
                StatusCode::TOO_MANY_REQUESTS | StatusCode::FORBIDDEN => {
                    scans.increment_status_code(url.as_str(), resp.status());
                }
                _ => {}
            }
            Ok(resp)
        }
        Err(e) => {
            log::warn!("err: {:?}", e);
            scans.increment_error(url.as_str());
            bail!(e)
        }
    }
}
pub async fn logged_request ( url : & Url , handles : Arc < Handles > ) -> Result < Response > { let client = & handles . config . client ; let level = handles . config . output_level ; let tx_stats = handles . stats . tx . clone ( ) ; let response = make_request ( client , url , level , & handles . config , tx_stats ) . await ; let scans = handles . ferox_scans ( ) ? ; match response { Ok ( resp ) => { match resp . status ( ) { StatusCode :: TOO_MANY_REQUESTS | StatusCode :: FORBIDDEN => { scans . increment_status_code ( url . as_str ( ) , resp . status ( ) ) ; } _ => { } } Ok ( resp ) } Err ( e ) => { log :: warn ! ( " " e ) ; scans . increment_error ( url . as_str ( ) ) ; bail ! ( e ) } } }
wrapper for make_request used to pass error/response codes to FeroxScans for per-scan stats
tracking of information related to auto-tune/bail
wrapper for make_request used to pass error / response codes to FeroxScans for per - scan stats tracking of information related to auto - tune / bail
url
&Url
handles
Arc<Handles>