https://kotlinlang.org logo
Title
c

Czar

03/14/2020, 2:58 PM
is there a way to make ktor log request bodies?
e

e5l

03/16/2020, 6:27 AM
Hi @Czar, client or server?
c

Czar

03/16/2020, 7:08 AM
Client
e

e5l

03/16/2020, 7:09 AM
level = BODY
in the
Logging
feature should work with
1.3.2
c

Czar

03/16/2020, 8:36 AM
I have level ALL, it doesn't work
e

e5l

03/16/2020, 11:02 AM
Could you file an issue with example? I'll take a look
c

Czar

03/16/2020, 11:30 AM
sure will do
log:
[main] INFO io.ktor.client.HttpClient - REQUEST: <http://localhost:8080/>
[main] INFO io.ktor.client.HttpClient - METHOD: HttpMethod(value=POST)
[main] INFO io.ktor.client.HttpClient - COMMON HEADERS
[main] INFO io.ktor.client.HttpClient - -> Accept-Charset: UTF-8
[main] INFO io.ktor.client.HttpClient - -> Accept: */*
[main] INFO io.ktor.client.HttpClient - CONTENT HEADERS
[main] INFO io.ktor.client.HttpClient - BODY Content-Type: text/plain; charset=UTF-8
[main] INFO io.ktor.client.HttpClient - RESPONSE: 200 
-- response stuff skipped for brevity --
And this is the bug report: https://github.com/ktorio/ktor/issues/1729