diff --git a/src/main/kotlin/com/github/djaler/evilbot/config/RestConfig.kt b/src/main/kotlin/com/github/djaler/evilbot/config/RestConfig.kt index 748dd76..6c781b7 100644 --- a/src/main/kotlin/com/github/djaler/evilbot/config/RestConfig.kt +++ b/src/main/kotlin/com/github/djaler/evilbot/config/RestConfig.kt @@ -20,7 +20,7 @@ import org.springframework.context.annotation.Configuration class RestConfig { @Bean fun httpClient(objectMapper: ObjectMapper): HttpClient { - return HttpClient { + val httpClient = HttpClient { install(ContentNegotiation) { register(ContentType.Any, JacksonConverter(objectMapper)) } @@ -28,11 +28,13 @@ class RestConfig { install(HttpTimeout) install(Logging) { - level = LogLevel.ALL + level = LogLevel.BODY } install(SentryPlugin) } + + return httpClient } } @@ -55,7 +57,7 @@ val SentryPlugin = createClientPlugin("SentryPlugin") { request.url.toString(), request.method.value ).apply { - setData("response", response.bodyAsText()) + setData("content", response.bodyAsText()) } ) }