Skip to content

Explain better how to use https with use-esplora-reqwest #685

@w0xlt

Description

@w0xlt

#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomersnew featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions