mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Refactor: Rename 'requestWithGET' to 'get'
This commit is contained in:
parent
de2ba82b3d
commit
9496691f76
@ -297,7 +297,7 @@ public class MobileNotificationService {
|
||||
String threadName = "sendMobileNotification-" + msgAsHex.substring(0, 5) + "...";
|
||||
ListenableFuture<String> future = executorService.submit(() -> {
|
||||
Thread.currentThread().setName(threadName);
|
||||
String result = httpClient.requestWithGET(param, "User-Agent",
|
||||
String result = httpClient.get(param, "User-Agent",
|
||||
"bisq/" + Version.VERSION + ", uid:" + httpClient.getUid());
|
||||
log.info("sendMobileNotification result: " + result);
|
||||
checkArgument(result.equals(SUCCESS), "Result was not 'success'. result=" + result);
|
||||
|
@ -45,7 +45,7 @@ public class FeeProvider extends HttpClientProvider {
|
||||
}
|
||||
|
||||
public Tuple2<Map<String, Long>, Map<String, Long>> getFees() throws IOException {
|
||||
String json = httpClient.requestWithGET("getFees", "User-Agent", "bisq/" + Version.VERSION);
|
||||
String json = httpClient.get("getFees", "User-Agent", "bisq/" + Version.VERSION);
|
||||
|
||||
LinkedTreeMap<?, ?> linkedTreeMap = new Gson().fromJson(json, LinkedTreeMap.class);
|
||||
Map<String, Long> tsMap = new HashMap<>();
|
||||
|
@ -58,7 +58,7 @@ public class PriceProvider extends HttpClientProvider {
|
||||
if (P2PService.getMyNodeAddress() != null)
|
||||
hsVersion = P2PService.getMyNodeAddress().getHostName().length() > 22 ? ", HSv3" : ", HSv2";
|
||||
|
||||
String json = httpClient.requestWithGET("getAllMarketPrices", "User-Agent", "bisq/"
|
||||
String json = httpClient.get("getAllMarketPrices", "User-Agent", "bisq/"
|
||||
+ Version.VERSION + hsVersion);
|
||||
|
||||
|
||||
|
@ -206,7 +206,7 @@ class XmrTxProofRequest implements AssetTxProofRequest<XmrTxProofRequest.Result>
|
||||
"&viewkey=" + model.getTxKey() +
|
||||
"&txprove=1";
|
||||
log.info("Param {} for {}", param, this);
|
||||
String json = httpClient.requestWithGET(param, "User-Agent", "bisq/" + Version.VERSION);
|
||||
String json = httpClient.get(param, "User-Agent", "bisq/" + Version.VERSION);
|
||||
try {
|
||||
String prettyJson = new GsonBuilder().setPrettyPrinting().create().toJson(new JsonParser().parse(json));
|
||||
log.info("Response json from {}\n{}", this, prettyJson);
|
||||
|
@ -26,9 +26,9 @@ public interface HttpClient {
|
||||
|
||||
void setIgnoreSocks5Proxy(boolean ignoreSocks5Proxy);
|
||||
|
||||
String requestWithGET(String param,
|
||||
@Nullable String headerKey,
|
||||
@Nullable String headerValue) throws IOException;
|
||||
String get(String param,
|
||||
@Nullable String headerKey,
|
||||
@Nullable String headerValue) throws IOException;
|
||||
|
||||
String post(String param,
|
||||
@Nullable String headerKey,
|
||||
|
@ -102,9 +102,9 @@ public class HttpClientImpl implements HttpClient {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String requestWithGET(String param,
|
||||
@Nullable String headerKey,
|
||||
@Nullable String headerValue) throws IOException {
|
||||
public String get(String param,
|
||||
@Nullable String headerKey,
|
||||
@Nullable String headerValue) throws IOException {
|
||||
return doRequest(param, HttpMethod.GET, headerKey, headerValue);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user