From 900dbdad86374e8f101ce9f15bb343af9d8c8143 Mon Sep 17 00:00:00 2001 From: JulieHillRoa Date: Mon, 14 Aug 2023 15:21:01 +0200 Subject: [PATCH] mer logging --- .../veilarbperson/client/aiabackend/AiaBackendClientImpl.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/no/nav/veilarbperson/client/aiabackend/AiaBackendClientImpl.kt b/src/main/java/no/nav/veilarbperson/client/aiabackend/AiaBackendClientImpl.kt index f7832d52..4df9780d 100644 --- a/src/main/java/no/nav/veilarbperson/client/aiabackend/AiaBackendClientImpl.kt +++ b/src/main/java/no/nav/veilarbperson/client/aiabackend/AiaBackendClientImpl.kt @@ -5,7 +5,8 @@ import no.nav.common.health.HealthCheckUtils import no.nav.common.rest.client.RestClient import no.nav.common.rest.client.RestUtils import no.nav.common.utils.UrlUtils.joinPaths -import no.nav.veilarbperson.utils.deserializeJsonOrThrow +import org.springframework.http.HttpHeaders.ACCEPT +import org.springframework.http.MediaType.APPLICATION_JSON_VALUE import no.nav.veilarbperson.utils.toJson import okhttp3.OkHttpClient import okhttp3.Request @@ -23,12 +24,12 @@ class AiaBackendClientImpl(private val aiaBackendUrl: String, private val userTo val request = Request.Builder() .url(joinPaths(aiaBackendUrl, "/veileder/besvarelse")) .header(HttpHeaders.AUTHORIZATION, userTokenSupplier.get()) + .header(ACCEPT, APPLICATION_JSON_VALUE) .post(endringIRegistreringsdataRequestDTO.toJson().toRequestBody(RestUtils.MEDIA_TYPE_JSON)) .build() client.newCall(request).execute().use { response -> RestUtils.throwIfNotSuccessful(response) - log.info("Endring i situasjon - responsestatus: {}", response.code) return response } }