Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 0865313

Browse files
committed
extend IridiumClient constructor to allow passing a custom HttpClient, e.g for adding custom http headers
1 parent 4ff8021 commit 0865313

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/cash/ird/walletd/IridiumClient.java

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import cash.ird.walletd.model.request.BlockRange;
77
import cash.ird.walletd.model.request.Key;
88
import cash.ird.walletd.model.response.*;
9+
import cash.ird.walletd.rpc.HttpClient;
910
import cash.ird.walletd.rpc.WalletdClient;
1011
import cash.ird.walletd.rpc.exception.IridiumWalletdException;
1112
import cash.ird.walletd.rpc.method.RequestMethod;
@@ -33,6 +34,10 @@ public IridiumClient(String url) {
3334
this.walletdClient = new WalletdClient(url);
3435
}
3536

37+
public IridiumClient(String url, HttpClient httpClient) {
38+
this.walletdClient = new WalletdClient(url, httpClient);
39+
}
40+
3641
@Override
3742
public boolean reset() throws IridiumWalletdException {
3843
return this.walletdClient.doRequest(RequestMethod.RESET, NoopResponse.class) != null;

0 commit comments

Comments
 (0)