From 7abe2954d3783cb8a6484f012507be95d59c82b9 Mon Sep 17 00:00:00 2001 From: Marcin Migdal Date: Tue, 19 Mar 2019 13:14:24 +0100 Subject: Change CloudHttpClient API parse Array Change-Id: I1127ab28ee4f0e482540829f26acfc1bc8f5667c Issue-ID: DCAEGEN2-1310 Signed-off-by: mmigdal Signed-off-by: Marcin Migdal --- .../client/service/consumer/DMaaPConsumerReactiveHttpClient.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'rest-services/dmaap-client/src/main') diff --git a/rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClient.java b/rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClient.java index d0f95f6e..b37ac3dc 100644 --- a/rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClient.java +++ b/rest-services/dmaap-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPConsumerReactiveHttpClient.java @@ -20,6 +20,7 @@ package org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.service.consumer; +import com.google.gson.JsonArray; import java.net.URI; import java.util.Map; import java.util.Optional; @@ -59,15 +60,15 @@ public class DMaaPConsumerReactiveHttpClient extends DMaaPAbstractReactiveHttpCl * * @return reactive response from DMaaP in string format */ - public Mono getDMaaPConsumerResponse(Optional requestDiagnosticContextOptional) { + public Mono getDMaaPConsumerResponse(Optional requestDiagnosticContextOptional) { Map headers = DMaaPClientServiceUtils.getHeaders(consumerConfiguration.dmaapContentType()); if (requestDiagnosticContextOptional.isPresent()) { return cloudHttpClient - .get(getUri().toString(), requestDiagnosticContextOptional.get(), headers, String.class); + .get(getUri().toString(), requestDiagnosticContextOptional.get(), headers, JsonArray.class); } RequestDiagnosticContext requestDiagnosticContext = ImmutableRequestDiagnosticContext.builder() .invocationId(UUID.randomUUID()).requestId(UUID.randomUUID()).build(); - return cloudHttpClient.get(getUri().toString(), requestDiagnosticContext, headers, String.class); + return cloudHttpClient.get(getUri().toString(), requestDiagnosticContext, headers, JsonArray.class); } URI getUri() { -- cgit 1.2.3-korg