async fn website_login(user: &SwanlingUser) -> SwanlingTaskResult {
    let request_builder = user.swanling_post("/login").await?;
    // https://docs.rs/reqwest/*/reqwest/blocking/struct.RequestBuilder.html#method.form
    let params = [("username", "test_user"), ("password", "")];
    let _swanling = user
        .swanling_send(request_builder.form(&params), None)
        .await?;

    Ok(())
}
/// Demonstrates how to log in when a user starts. We flag this task as an
/// on_start task when registering it above. This means it only runs one time
/// per user, when the user thread first starts.
Demonstrates how to log in when a user starts. We flag this task as an
on_start task when registering it above. This means it only runs one time
per user, when the user thread first starts.
Demonstrates how to log in when a user starts . We flag this task as an on_start task when registering it above . This means it only runs one time per user when the user thread first starts .
async fn website_login(user: &SwanlingUser) -> SwanlingTaskResult {
    let request_builder = user.swanling_post("/login").await?;
    // https://docs.rs/reqwest/*/reqwest/blocking/struct.RequestBuilder.html#method.form
    let params = [("username", "test_user"), ("password", "")];
    let _swanling = user
        .swanling_send(request_builder.form(&params), None)
        .await?;
    Ok(())
}
async fn website_login ( user : & SwanlingUser ) -> SwanlingTaskResult { let request_builder = user . swanling_post ( " " ) . await ? ; // https://docs.rs/reqwest/*/reqwest/blocking/struct.RequestBuilder.html#method.form let params = [ ( " " , " " ) , ( " " , " " ) ] ; let _swanling = user . swanling_send ( request_builder . form ( & params ) , None ) . await ? ; Ok ( ( ) ) }
Demonstrates how to log in when a user starts.
Demonstrates how to log in when a user starts .
user
&SwanlingUser