Companion

Functions

Link copied to clipboard
fun http(renderMode: RenderMode = OnFailure, redirectFilter: Filter = Filter.NoOp, clock: Clock = Clock.systemUTC(), random: Random = SecureRandom(byteArrayOf()), serverName: String = "http4k-server", baseUrl: Uri = Uri.of(""), traceStore: TraceStore = TraceStore.InMemory(), logStore: LogStore = LogStore.InMemory(), transactionStore: TransactionStore = TransactionStore.InMemory(), livingDocsSections: List<LivingDocSection> = defaultLivingDocSections, traceReportTabs: List<TabContentRenderer> = defaultTraceReportTabs, reportDir: File = outputDir, appFn: Context.() -> HttpHandler): Intercept

Intercept a simple HttpHandler.

Link copied to clipboard
fun Intercept.Companion.mcp(renderMode: RenderMode = OnFailure, redirectFilter: Filter = Filter.NoOp, clock: Clock = Clock.systemUTC(), random: Random = SecureRandom(byteArrayOf()), serverName: String = "http4k-server", baseUrl: Uri = Uri.of(""), traceStore: TraceStore = TraceStore.InMemory(), logStore: LogStore = LogStore.InMemory(), transactionStore: TransactionStore = TransactionStore.InMemory(), livingDocsSections: List<LivingDocSection> = defaultLivingDocSections, traceReportTabs: List<TabContentRenderer> = defaultTraceReportTabs, reportDir: File = outputDir, appFn: Context.() -> PolyHandler): Intercept

Intercept an MCP Server. Synonym for poly().

Link copied to clipboard
fun Intercept.Companion.mcpCapabilities(renderMode: RenderMode = OnFailure, redirectFilter: Filter = Filter.NoOp, clock: Clock = Clock.systemUTC(), random: Random = SecureRandom(byteArrayOf()), serverName: String = "http4k-server", baseUrl: Uri = Uri.of(""), traceStore: TraceStore = TraceStore.InMemory(), logStore: LogStore = LogStore.InMemory(), transactionStore: TransactionStore = TransactionStore.InMemory(), livingDocsSections: List<LivingDocSection> = defaultLivingDocSections, traceReportTabs: List<TabContentRenderer> = defaultTraceReportTabs, reportDir: File = outputDir, vararg extensions: McpExtension, capabilityFn: Context.() -> Iterable<ServerCapability>): Intercept

Intercept an http4k MCP ServerCapability. For whole MCP servers, use poly()

Link copied to clipboard
fun poly(renderMode: RenderMode = OnFailure, redirectFilter: Filter = Filter.NoOp, clock: Clock = Clock.systemUTC(), random: Random = SecureRandom(byteArrayOf()), serverName: String = "http4k-server", baseUrl: Uri = Uri.of(""), traceStore: TraceStore = TraceStore.InMemory(), logStore: LogStore = LogStore.InMemory(), transactionStore: TransactionStore = TransactionStore.InMemory(), livingDocsSections: List<LivingDocSection> = defaultLivingDocSections, traceReportTabs: List<TabContentRenderer> = defaultTraceReportTabs, reportDir: File = outputDir, appFn: Context.() -> PolyHandler): Intercept

Intercept a PolyHandler.