https://kotlinlang.org logo
#ktor
Title
# ktor
r

Rak

06/16/2021, 11:06 AM
I have setup ktor with json serialization and it works well. I can issue a request like this:
Copy code
val customer: Customer = client.get("<http://127.0.0.1:8080/customer>")
My question is how can I then get the response headers?
r

Rustam Siniukov

06/16/2021, 11:09 AM
Copy code
val response = client.get<HttpResponse>(url)
val body = response.receive<Customer>()
val header = response.headers[...]
👍 1