pub async fn login(username: &str, password: &str) -> crate::Result<Self> {
        let params = [
            ("login", username),
            ("password", password),
            ("mememberMe", "true"),
        ];

        let rb: reqwest::RequestBuilder = { get_http_client()?.post(MYPLEX_LOGIN_URL) };
        let response = rb
            .form(&params)
            .headers(base_headers()?)
            .header(reqwest::header::ACCEPT, "application/json")
            .send()
            .await?;
        MyPlexAccount::handle_login(response).await
    }
/// Log in to [MyPlex](http://app.plex.tv) using username and password.
Log in to [MyPlex] using username and password.
Log in to [ MyPlex ] using username and password .
pub async fn login(username: &str, password: &str) -> crate::Result<Self> {
        let params = [
            ("login", username),
            ("password", password),
            ("mememberMe", "true"),
        ];
        let rb: reqwest::RequestBuilder = { get_http_client()?.post(MYPLEX_LOGIN_URL) };
        let response = rb
            .form(&params)
            .headers(base_headers()?)
            .header(reqwest::header::ACCEPT, "application/json")
            .send()
            .await?;
        MyPlexAccount::handle_login(response).await
    }
pub async fn login ( username : & str , password : & str ) -> crate :: Result < Self > { let params = [ ( " " , username ) , ( " " , password ) , ( " " , " " ) , ] ; let rb : reqwest :: RequestBuilder = { get_http_client ( ) ? . post ( MYPLEX_LOGIN_URL ) } ; let response = rb . form ( & params ) . headers ( base_headers ( ) ? ) . header ( reqwest :: header :: ACCEPT , " " ) . send ( ) . await ? ; MyPlexAccount :: handle_login ( response ) . await }
Log in to [MyPlex](http://app.plex.tv) using username and password.
Log in to [ MyPlex ] ( http : // app . plex . tv ) using username and password .
username
&str
password
&str
username
&str
password
&str