File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
app/src/main/kotlin/no/nav/hjelpemidler/soknad/db/rapportering/epost Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,12 @@ package no.nav.hjelpemidler.soknad.db.rapportering.epost
33import io.github.oshai.kotlinlogging.KotlinLogging
44import io.ktor.client.HttpClient
55import io.ktor.client.engine.apache.Apache
6+ import io.ktor.client.plugins.defaultRequest
7+ import io.ktor.client.request.accept
68import io.ktor.client.request.post
79import io.ktor.client.request.setBody
10+ import io.ktor.http.ContentType
11+ import io.ktor.http.contentType
812import kotlinx.coroutines.Dispatchers
913import kotlinx.coroutines.withContext
1014import no.nav.hjelpemidler.http.createHttpClient
@@ -17,6 +21,10 @@ class GraphClient(
1721 private val openIDClient : OpenIDClient ,
1822 private val httpClient : HttpClient = createHttpClient(Apache .create()) {
1923 expectSuccess = true
24+ defaultRequest {
25+ accept(ContentType .Application .Json )
26+ contentType(ContentType .Application .Json )
27+ }
2028 },
2129 private val baseUrl : String = " https://graph.microsoft.com/v1.0" ,
2230 private val scope : String = " https://graph.microsoft.com/.default" ,
You can’t perform that action at this time.
0 commit comments