Java
Kotlin
undertow

Java(Kotlin)のUndertowでリダイレクトをする

More than 1 year has passed since last update.
object Test: HttpHandler {
    override fun handleRequest(exchange: HttpServerExchange) {
        exchange.statusCode = 302
        exchange.responseHeaders.put(Headers.LOCATION, "http://yahoo.co.jp")
    }
}