From f2f8dd271a6d0ff40a3bceb79cf8dc7fe6ee809a Mon Sep 17 00:00:00 2001 From: Jonas Enge Date: Mon, 13 May 2024 14:32:20 +0200 Subject: [PATCH] Legger til behandlingsnummer i PDL request --- .../fo/veilarbregistrering/bruker/pdl/PdlOppslagClient.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/no/nav/fo/veilarbregistrering/bruker/pdl/PdlOppslagClient.kt b/src/main/kotlin/no/nav/fo/veilarbregistrering/bruker/pdl/PdlOppslagClient.kt index f6c9f28e4..65d53ed37 100644 --- a/src/main/kotlin/no/nav/fo/veilarbregistrering/bruker/pdl/PdlOppslagClient.kt +++ b/src/main/kotlin/no/nav/fo/veilarbregistrering/bruker/pdl/PdlOppslagClient.kt @@ -68,9 +68,10 @@ open class PdlOppslagClient( ): String { val requestBody = RestUtils.toJsonRequestBody(graphqlRequest) val authHeaders = if (erSystemKontekst) lagAuthHeadersForSystem() else lagAuthHeaders() + val baseHeaders = mapOf(BEHANDLINGSNUMMER_HEADER to BEHANDLINGSNUMMER_HEADER_VERDI) val request = Request.Builder() .url(UrlUtils.joinPaths(baseUrl, "/graphql")) - .headers(Headers.of(authHeaders + ekstraHeaders)) + .headers(Headers.of(baseHeaders + authHeaders + ekstraHeaders)) .method("POST", requestBody) .build() try { @@ -173,6 +174,8 @@ open class PdlOppslagClient( private const val NAV_PERSONIDENT_HEADER = "Nav-Personident" private const val TEMA_HEADER = "Tema" private const val OPPFOLGING_TEMA_HEADERVERDI = "OPP" + private const val BEHANDLINGSNUMMER_HEADER = "behandlingsnummer" + private const val BEHANDLINGSNUMMER_HEADER_VERDI = "B452" } override fun checkHealth(): HealthCheckResult {