diff options
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/asdc/rest/SdcRestClient.java')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/asdc/rest/SdcRestClient.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/rest/SdcRestClient.java b/vid-app-common/src/main/java/org/onap/vid/asdc/rest/SdcRestClient.java index ab07aaeed..428083e7b 100644 --- a/vid-app-common/src/main/java/org/onap/vid/asdc/rest/SdcRestClient.java +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/rest/SdcRestClient.java @@ -22,6 +22,7 @@ package org.onap.vid.asdc.rest; import com.att.eelf.configuration.EELFLogger; import com.google.common.collect.ImmutableMap; +import io.joshworks.restclient.http.HttpResponse; import io.vavr.control.Try; import org.onap.portalsdk.core.util.SystemProperties; import org.onap.vid.asdc.AsdcCatalogException; @@ -97,6 +98,13 @@ public class SdcRestClient implements AsdcClient { } + public HttpResponse<String> checkSDCConnectivity() { + String finalUrl = baseUrl + URIS.HEALTH_CHECK_ENDPOINT; + + return syncRestClient + .get(finalUrl, prepareHeaders(auth, APPLICATION_JSON), Collections.emptyMap(), String.class); + } + private Map<String, String> prepareHeaders(String auth, String contentType) { return ImmutableMap.of( X_ECOMP_INSTANCE_ID, SystemProperties.getProperty(APP_DISPLAY_NAME), |