ClientFilters

Types

Link copied to clipboard
object BasicAuth
Link copied to clipboard
object BearerAuth
Link copied to clipboard
object Cookies
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Sets the Content Type request header.

Functions

Link copied to clipboard
fun AcceptGZip(compressionMode: GzipCompressionMode = Memory()): Filter

Support for GZipped responses from clients.

Link copied to clipboard
Link copied to clipboard

This Filter is used to clean the Request and Response when proxying directly to another system. The purpose of this is to remove any routing metadata that we may have attached to it before sending it onwards.

Link copied to clipboard
fun GZip(compressionMode: GzipCompressionMode = Memory()): Filter

Basic GZip and Gunzip support of Request/Response. Only Gunzip responses when the response contains "content-encoding" header containing 'gzip'

Link copied to clipboard
fun RequestTracing(startReportFn: (Request, ZipkinTraces) -> Unit = { _, _ -> }, endReportFn: (Request, Response, ZipkinTraces) -> Unit = { _, _, _ -> }, storage: ZipkinTracesStorage = ZipkinTracesStorage.THREAD_LOCAL): Filter

Adds Zipkin request tracing headers to the outbound request. (traceid, spanid, parentspanid)

Link copied to clipboard
fun ResetRequestTracing(storage: ZipkinTracesStorage = ZipkinTracesStorage.THREAD_LOCAL): Filter

Reset Zipkin request tracing. Use this to provide a new TraceId for every outbound call.

Link copied to clipboard

Sets the base uri (host + base path) on an outbound request. This is useful to separate configuration of remote endpoints from the logic required to construct the rest of the request.

Link copied to clipboard

Sets the host on an outbound request. This is useful to separate configuration of remote endpoints from the logic required to construct the rest of the request.

Link copied to clipboard

Copy the Host header into the x-forwarded-host header of a request. Used when we are using proxies to divert traffic to another server.