pub async fn request_and_handle<F>(
session: &str,
req: &Request,
auto_spawn: bool,
on_success: F,
) -> i32Expand description
Send a request and dispatch the response through a user-supplied callback.
Handles the Error branch centrally (prints the message and returns the
exit code). on_success receives any other response and returns
Some(exit_code) to finish or None for an unexpected-response fallback.