pub fn basic_auth(self, username: impl fmt::Display, password: impl fmt::Display) -> Self {
        let auth = format!("{}:{}", username, password);

        self.insert_header((
            header::AUTHORIZATION,
            format!("Basic {}", base64::encode(&auth)),
        ))
    }
/// Set HTTP basic authorization header.
///
/// If no password is needed, just provide an empty string.
Set HTTP basic authorization header.
If no password is needed, just provide an empty string.
Set HTTP basic authorization header . If no password is needed just provide an empty string .
pub fn basic_auth(self, username: impl fmt::Display, password: impl fmt::Display) -> Self {
        let auth = format!("{}:{}", username, password);
        self.insert_header((
            header::AUTHORIZATION,
            format!("Basic {}", base64::encode(&auth)),
        ))
    }
pub fn basic_auth ( self , username : impl fmt :: Display , password : impl fmt :: Display ) -> Self { let auth = format ! ( " " username password ) ; self . insert_header ( ( header :: AUTHORIZATION , format ! ( " " base64 encode ( auth ) ) , ) ) }
Set HTTP basic authorization header.
Set HTTP basic authorization header .
self
username
impl fmt::Display
password
impl fmt::Display
self
username
impl fmt::Display
password
impl fmt::Display