Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private static class Builder implements ITokens {
/**
* The baser url.
*/
String baserUrl;
String baseUrl;

/**
* The tokens.
Expand Down Expand Up @@ -115,7 +115,7 @@ private static class Builder implements ITokens {
* @param baseUrl the base url
*/
public Builder(String baseUrl) {
this.baserUrl = baseUrl;
this.baseUrl = baseUrl;
}

/*
Expand All @@ -138,18 +138,18 @@ public ITokens addToken(String key, String value) {
*/
@Override
public void setup() {
log.debug(this.baserUrl);
log.debug(this.baseUrl);
BigChainDBGlobals.setAuthorizationTokens(tokens);
BigChainDBGlobals.setBaseUrl(this.baserUrl + "/api" + BigchainDbApi.API_VERSION);
BigChainDBGlobals.setWsSocketUrl(this.baserUrl + "/api" + BigchainDbApi.API_VERSION + BigchainDbApi.STREAMS);
BigChainDBGlobals.setBaseUrl(this.baseUrl + "/api" + BigchainDbApi.API_VERSION);
BigChainDBGlobals.setWsSocketUrl(this.baseUrl + "/api" + BigchainDbApi.API_VERSION + BigchainDbApi.STREAMS);

if (this.httpClient == null && BigChainDBGlobals.getHttpClient() == null) {
BigChainDBGlobals.setHttpClient(buildDefaultHttpClient());
}

try {
BigChainDBGlobals.setApiEndpoints(JsonUtils.fromJson(
NetworkUtils.sendGetRequest(this.baserUrl + "/api" + BigchainDbApi.API_VERSION).body().string(),
NetworkUtils.sendGetRequest(this.baseUrl + "/api" + BigchainDbApi.API_VERSION).body().string(),
ApiEndpoints.class));
} catch (IOException e) {
e.printStackTrace();
Expand Down