#526 adds sample code to connect to Esplora and has the following configuration in Cargo.toml.
[[example]]
name = "esplora_backend"
path = "examples/esplora_backend.rs"
required-features = ["use-esplora-ureq"]
The cargo run --features="use-esplora-ureq" --example esplora_backend command works fine.
But if the below change is made:
[[example]]
name = "esplora_backend"
path = "examples/esplora_backend.rs"
-required-features = ["use-esplora-ureq"]
+required-features = ["use-esplora-reqwest"]
The cargo run --features="use-esplora-reqwest" --example esplora_backend command will fail.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Esplora(Reqwest(reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("blockstream.info")), port: None, path: "/testnet/api/scripthash/2a69c29645663a231f39008866d65f855038570c1664987845f60dcad9f99253/txs", query: None, fragment: None }, source: hyper::Error(Connect, "invalid URL, scheme is not http") }))', examples/esplora_backend.rs:42:54
#526 adds sample code to connect to Esplora and has the following configuration in Cargo.toml.
The
cargo run --features="use-esplora-ureq" --example esplora_backendcommand works fine.But if the below change is made:
The
cargo run --features="use-esplora-reqwest" --example esplora_backendcommand will fail.