filterResponse

abstract suspend fun filterResponse(url: Url, contentLength: Long?, contentType: ContentType?, headers: Headers, body: ByteReadChannel): BodyFilterResult(source)

Applies a filtering operation on the response body based on the specified parameters. Determines how the response body should be included in the logs.

Report a problem

Return

The result of applying the body filter, which may include a subset or an alternative representation of the body.

Parameters

url

The URL of the request.

contentLength

The length of the response content, or null if unknown.

contentType

The content type of the response, or null if unspecified.

headers

The headers of the response.

body

The channel containing the response body data.