Benjamin Schlie
02/05/2021, 4:08 PMinstall(StatusPages)
in each of them. The routes works, but not the StatusPages.
routing {
header(HttpHeaders.Host, "localhost:8080") {
route("/") {
handle {
call.respondText("Hello world")
}
}
install(StatusPages) {
status(HttpStatusCode.NotFound) { status ->
call.respondText("Not found!")
}
}
}
}
routing {
header(HttpHeaders.Host, "another-host:8080") {
route("/") {
handle {
call.respondText("Hello another world")
}
}
install(StatusPages) {
status(HttpStatusCode.NotFound) { status ->
call.respondText("No other world found!")
}
}
}
}
Rustam Siniukov
02/05/2021, 4:38 PMArkangel
02/05/2021, 5:47 PMArkangel
02/05/2021, 5:47 PMspand
02/06/2021, 8:56 AMRustam Siniukov
02/08/2021, 11:54 AMRustam Siniukov
02/08/2021, 2:45 PMrouting {
header(HttpHeaders.A, "A") {
get("A") { }
install(StatusPages) {
status(HttpStatusCode.NotFound) { status ->
call.respondText("Not found in A!")
}
}
}
header(HttpHeaders.B, "B") {
get("B") { }
install(StatusPages) {
status(HttpStatusCode.NotFound) { status ->
call.respondText("No found in B!")
}
}
}
}
if request is
client.get{
addHeader(Header.A, "A")
addHeader(Header.B, "B")
path = "C"
}
Here both sub routes match on headers and have StatusPages installed, but none of them contain required path.
My point is even after we support installing features into sub routes, StatusPages may require additional desginBenjamin Schlie
02/08/2021, 3:06 PM