InlineMiddleware

interface InlineMiddleware<I, O>

A middleware that directly registers interceptors onto an operation inline in install. This can be useful for example if a middleware needs to hook into multiple phases:

class MyMiddleware<I, O> : InlineMiddleware<I, O> {
override fun install(op: SdkHttpOperation<I, O>) {
op.execution.initialize.intercept { req, next -> ... }

op.execution.mutate.intercept { req, next -> ... }
}
}

Functions

Link copied to clipboard
abstract fun install(op: SdkHttpOperation<I, O>)