-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers
Description
Feature Request
An example showing how to configure and use EsploraClient with custom timeout settings would be helpful for developers using BDK with unreliable or slow network connections.
Why?
Currently, the documentation does not illustrate how to:
- Set custom request timeouts when using
EsploraClient - Handle timeout-related errors gracefully
What’s Expected?
Please add a simple example (in the examples/ directory) demonstrating:
- Instantiating
EsploraClientwith a customureq::Agent - Setting timeout durations (connect/read/write)
- Making a sample call (e.g.,
get_heightorget_tx) with the client
Example Reference
The relevant code might look like:
let agent = ureq::AgentBuilder::new()
.timeout_connect(Duration::from_secs(10))
.timeout_read(Duration::from_secs(30))
.timeout_write(Duration::from_secs(30))
.build();
let esplora_client = EsploraClient::from_agent("https://blockstream.info/api", agent);Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers
Type
Projects
Status
No status