From a0a54d15c2d24955f02919a92b2431254e217810 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Thu, 18 Jan 2024 19:12:45 +0100 Subject: [PATCH] change: Log requested URI --- .../twomartens/timetable/bahnApi/service/BahnApiService.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/service/BahnApiService.kt b/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/service/BahnApiService.kt index df25b9e..97fd658 100644 --- a/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/service/BahnApiService.kt +++ b/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/service/BahnApiService.kt @@ -39,9 +39,10 @@ class BahnApiService( val day = hourAtDay.date.format(dateFormatter) val hour = time.format(timeFormatter) val responseLogger = BahnResponseLogger() + val uri = "https://apis.deutschebahn.com/db-api-marketplace/apis/timetables/v1/plan/" + + "${eva.value}/${day}/${hour}" val response = restClient.get() - .uri("https://apis.deutschebahn.com/db-api-marketplace/apis/timetables/v1/plan/" + - "${eva.value}/${day}/${hour}") + .uri(uri) .headers { it.accept = mutableListOf(MediaType.APPLICATION_XML) it.contentType = MediaType.APPLICATION_XML @@ -50,7 +51,7 @@ class BahnApiService( } .retrieve() .onStatus(responseLogger) - log.debug { "Response from DB API, station [${eva.value}], date [$day], hour [$hour]" } + log.debug { "Response from DB API, station [${eva.value}], date [$day], hour [$hour], requestURI [$uri]" } val body = response.body(BahnTimetable::class.java) body!!.eva = eva return body