File tree 1 file changed +11
-10
lines changed
oauth2-klient/src/main/kotlin/no/nav/dagpenger/oauth2
1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -11,18 +11,19 @@ import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
11
11
import io.ktor.serialization.jackson.jackson
12
12
13
13
@JvmOverloads
14
- fun defaultHttpClient (httpClientEngine : HttpClientEngine = CIO .create()) =
15
- HttpClient (httpClientEngine) {
16
- expectSuccess = true
17
- install(ContentNegotiation ) {
18
- jackson {
19
- configure(DeserializationFeature .FAIL_ON_UNKNOWN_PROPERTIES , false )
20
- setSerializationInclusion(JsonInclude .Include .NON_NULL )
21
- }
22
- }
23
- engine {
14
+ fun defaultHttpClient (
15
+ httpClientEngine : HttpClientEngine =
16
+ CIO .create {
24
17
System .getenv("HTTP_PROXY ")?.let {
25
18
this.proxy = ProxyBuilder .http(it)
26
19
}
20
+ },
21
+ ) = HttpClient (httpClientEngine) {
22
+ expectSuccess = true
23
+ install(ContentNegotiation ) {
24
+ jackson {
25
+ configure(DeserializationFeature .FAIL_ON_UNKNOWN_PROPERTIES , false )
26
+ setSerializationInclusion(JsonInclude .Include .NON_NULL )
27
27
}
28
28
}
29
+ }
You can’t perform that action at this time.
0 commit comments