api

http4k / org.http4k.traffic / Responder

Responder

object Responder (source)

Provides HTTP Handlers which respond using pre-stored Requests.

Functions

Name Summary
from fun from(source: Source): HttpHandler
An HTTP Handler which responds to particular requests with the matching cached responses, or a 503.fun from(replay: Replay, shouldReplay: (HttpMessage) -> Boolean = { true }): HttpHandler
An HTTP Handler which responds to from a stream of cached responses, or a 503 once the stream is exhausted.

Extension Functions

Name Summary
with fun <T> T.with(vararg modifiers: (T) -> T): T