diff options
Diffstat (limited to 'ms')
2 files changed, 5 insertions, 1 deletions
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceProperties.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceProperties.kt index 604d4d40b..2a0e7a443 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceProperties.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceProperties.kt @@ -63,6 +63,8 @@ open class RestResourceSource : ResourceSourceProperties() { var inputKeyMapping: MutableMap<String, String>? = null @get:JsonProperty("output-key-mapping") var outputKeyMapping: MutableMap<String, String>? = null + @get:JsonProperty("headers") + var headers: Map<String, String> = emptyMap() @get:JsonProperty("key-dependencies") lateinit var keyDependencies: MutableList<String> } diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt index 2b9239f4c..e9aa2749a 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt @@ -83,10 +83,12 @@ open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyS logger.info("RestResource ($dSource) dictionary information: " + "URL:($urlPath), input-key-mapping:($inputKeyMapping), output-key-mapping:(${sourceProperties.outputKeyMapping})") + val requestHeaders = sourceProperties.headers + logger.info("$dSource dictionary information : ($urlPath), ($inputKeyMapping), (${sourceProperties.outputKeyMapping})") // Get the Rest Client Service val restClientService = blueprintWebClientService(resourceAssignment, sourceProperties) - val response = restClientService.exchangeResource(verb, urlPath, payload) + val response = restClientService.exchangeResource(verb, urlPath, payload, requestHeaders.toMap()) val responseStatusCode = response.status val responseBody = response.body val outputKeyMapping = sourceProperties.outputKeyMapping |