All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.http4k.connect.example.FakeExample.kt Maven / Gradle / Ivy

There is a newer version: 5.35.1.0
Show newest version
package org.http4k.connect.example

import org.http4k.chaos.ChaoticHttpHandler
import org.http4k.chaos.start
import org.http4k.connect.storage.InMemory
import org.http4k.connect.storage.Storage
import org.http4k.routing.routes

class FakeExample(val echoes: Storage = Storage.InMemory()) : ChaoticHttpHandler() {
    override val app = routes(
        echo(echoes),
        reverse(),
        split()
    )

    fun client() = Example.Http(app)
}

fun main() {
    FakeExample().start()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy