Package-level declarations

Types

Link copied to clipboard
data class NetworkLogEntry(val method: String, val url: String, val requestHeaders: Map<String, String> = emptyMap(), val requestBody: String? = null, val status: Int? = null, val responseBody: String? = null, val durationMs: Long? = null, val timestamp: Long = 0)

One recorded HTTP exchange. Produced by NetworkLogPlugin, rendered by whatever debug UI you build.

Link copied to clipboard
class NetworkLogStore(capacity: Int = DEFAULT_CAPACITY)

In-memory ring buffer of the most recent capacity exchanges, newest first.

Properties

Link copied to clipboard

Header names redacted by toCurl. Matched case-insensitively, since header casing is not guaranteed by anything.

Functions

Link copied to clipboard
fun NetworkLogPlugin(store: NetworkLogStore, readResponseBody: Boolean = true): ClientPlugin<Unit>

Ktor client plugin that records every exchange into store.

Link copied to clipboard
fun NetworkLogEntry.toCurl(redactHeaders: Set<String> = DEFAULT_REDACTED_HEADERS): String

Renders this entry as a copy-pasteable curl command for local replay.