From 412fe0536a6555991b61b73d143531ce0f532cb4 Mon Sep 17 00:00:00 2001 From: Kirill Romanov Date: Tue, 9 Jul 2024 20:20:01 +0300 Subject: [PATCH] test --- .../kotlin/com/github/djaler/evilbot/config/RestConfig.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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()) } ) }