Fix Kotlin example for filtering handler functions

Closes gh-#27337
This commit is contained in:
Steve Wei 2021-08-30 23:47:31 +09:00 committed by GitHub
parent c27ec00ae9
commit b120e0b8f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -799,12 +799,12 @@ For instance, consider the following example:
ServerRequest.from(it)
.header("X-RequestHeader", "Value").build()
}
}
POST("/person", handler::createPerson)
after { _, response -> // <2>
logResponse(response)
}
}
}
----
<1> The `before` filter that adds a custom request header is only applied to the two GET routes.
<2> The `after` filter that logs the response is applied to all routes, including the nested ones.