From dd89e148932ba0acbfc6ceb4b229b001b6b8dd33 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Thu, 28 Jan 2021 13:12:40 -0500 Subject: allow RestClient to configure custom headers allow RestClient to configure custom headers always load the first implementation on the classpath Issue-ID: SO-3495 Signed-off-by: Benjamin, Max (mb388a) Change-Id: I9c433cdaed33a7db6182af259421676c088a1fae --- .../main/java/org/onap/so/client/sdnc/lcm/SDNCLcmRestClient.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src') diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmRestClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmRestClient.java index 3faf58ec28..85d67a89c9 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmRestClient.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmRestClient.java @@ -21,10 +21,11 @@ package org.onap.so.client.sdnc.lcm; import java.net.URI; -import java.util.Map; import java.util.Optional; -import org.onap.so.client.RestClient; +import javax.ws.rs.core.MultivaluedMap; +import org.javatuples.Pair; import org.onap.logging.filter.base.ONAPComponents; +import org.onap.so.client.RestClient; import org.onap.so.client.sdnc.lcm.beans.LcmInput; import org.onap.so.client.sdnc.lcm.beans.LcmOutput; import org.onap.so.client.sdnc.lcm.beans.LcmRestRequest; @@ -44,8 +45,8 @@ public class SDNCLcmRestClient extends RestClient { } @Override - protected void initializeHeaderMap(Map headerMap) { - headerMap.put("Authorization", sdncLcmProperties.getBasicAuth()); + protected void initializeHeaderMap(MultivaluedMap> headerMap) { + headerMap.add("ALL", Pair.with("Authorization", sdncLcmProperties.getBasicAuth())); } @Override -- cgit 1.2.3-korg