awc is the asynchronous HTTP client used by an Actix Web application to call a backend tutor service during registration. The handler submits a POST request after validating the registration form and receives the newly created tutor record, including its tutor ID. section 8.3
The registration workflow uses awc alongside application persistence:
- Check that the password and confirmation match before making the request. section 8.3
- Post the validated tutor data to the backend web service. section 8.3
- Store the returned tutor ID with the username and password hash in PostgreSQL for later authentication and profile requests. section 8.3
Registration submission
A handler such as handle_register validates form data, calls the tutor service through awc, and uses the returned tutor ID when storing the local user record. section 8.3
sqlx = {version = "0.3.5", default_features = false, features =
["postgres","runtime-tokio", "macros"]}
rust-argon2 = "0.8.3"
awc = "2.0.3"
Inspect the dependency listing showing awc 2.0.3 alongside sqlx and rust-argon2. section 8.3
