Fix Kotlin example for filtering handler functions
Closes gh-#27337
This commit is contained in:
parent
c27ec00ae9
commit
b120e0b8f4
|
|
@ -799,12 +799,12 @@ For instance, consider the following example:
|
||||||
ServerRequest.from(it)
|
ServerRequest.from(it)
|
||||||
.header("X-RequestHeader", "Value").build()
|
.header("X-RequestHeader", "Value").build()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
POST("/person", handler::createPerson)
|
POST("/person", handler::createPerson)
|
||||||
after { _, response -> // <2>
|
after { _, response -> // <2>
|
||||||
logResponse(response)
|
logResponse(response)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
----
|
----
|
||||||
<1> The `before` filter that adds a custom request header is only applied to the two GET routes.
|
<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.
|
<2> The `after` filter that logs the response is applied to all routes, including the nested ones.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue