Skip to content

Commit

Permalink
mer logging
Browse files Browse the repository at this point in the history
  • Loading branch information
JulieHillRoa committed Aug 14, 2023
1 parent 24615c3 commit fd38fbf
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,12 +24,13 @@ 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)
log.info("Endring i situasjon - responsestatus: {}, responsebody: {}", response.code, response.body?.string())
return response
}
}
Expand Down

0 comments on commit fd38fbf

Please sign in to comment.