pub fn download_image(&self, url: &str, file_size: i64) -> Vec<u8> {
        let mut image_response = self.check_response(self.client.get(url).send());
        let mut image_bytes: Vec<u8> = Vec::with_capacity(file_size as usize);
        image_response
            .copy_to(&mut image_bytes)
            .with_context(|e| {
                error!("Failed to download image!");
                format!("{}", e)
            })
            .unwrap();

        image_bytes
    }
/// Sends request to download image.
Sends request to download image.
Sends request to download image .
pub fn download_image(&self, url: &str, file_size: i64) -> Vec<u8> {
        let mut image_response = self.check_response(self.client.get(url).send());
        let mut image_bytes: Vec<u8> = Vec::with_capacity(file_size as usize);
        image_response
            .copy_to(&mut image_bytes)
            .with_context(|e| {
                error!("Failed to download image!");
                format!("{}", e)
            })
            .unwrap();
        image_bytes
    }
pub fn download_image ( & self , url : & str , file_size : i64 ) -> Vec < u8 > { let mut image_response = self . check_response ( self . client . get ( url ) . send ( ) ) ; let mut image_bytes : Vec < u8 > = Vec :: with_capacity ( file_size as usize ) ; image_response . copy_to ( & mut image_bytes ) . with_context ( | e | { error ! ( " " ) ; format ! ( " " e ) } ) . unwrap ( ) ; image_bytes }
Sends request to download image.
Sends request to download image .
&self
url
&str
file_size
i64
&self
url
&str
file_size
i64