Initialize reqwest clients with verbose logging

This commit is contained in:
Thomas Eizinger 2021-04-19 10:10:46 +10:00
parent 7e688eb7e8
commit 0970c2bc72
No known key found for this signature in database
GPG key ID: 651AC83A6C6C8B96
6 changed files with 34 additions and 24 deletions

View file

@ -25,7 +25,7 @@ pub struct Wallet {
impl Wallet {
/// Connect to a wallet RPC and load the given wallet by name.
pub async fn open_or_create(url: Url, name: String, env_config: Config) -> Result<Self> {
let client = wallet::Client::new(url);
let client = wallet::Client::new(url)?;
let open_wallet_response = client.open_wallet(name.clone()).await;
if open_wallet_response.is_err() {

View file

@ -165,7 +165,7 @@ impl WalletRpc {
}
// Send a json rpc request to make sure monero_wallet_rpc is ready
Client::localhost(port).get_version().await?;
Client::localhost(port)?.get_version().await?;
Ok(WalletRpcProcess {
_child: child,