curl-logger-ktor-plugin
Installation
SKILL.md
Log the request as a command you can run
The cheapest reproduction tool there is: intercept the request on its way out, print the equivalent
curl, paste it into a terminal. No proxy, no capture tool, works on a user's device log.
// adapted — the package is the reader's; the config class's KDoc is condensed to one line on each
// of the two settings that carry a decision. Its three members, the plugin body, the escaping and
// the header loop are the source's own.
class CurlLoggerConfig {
var logger: (String) -> Unit = { println(it) }
/** Header names (case-insensitive) shown as `<redacted>`. Empty by default. */
var redactHeaders: Set<String> = emptySet()
/** Drop `Accept-Encoding` and append `--compressed` so curl decodes the response itself. */
var handleCompression: Boolean = true
}