Hi, I have a RoutingHttpHandler (a group of routes), is there a way to define a response header just once instead of adding to each route individually (i.e.
.with(CONTENT_TYPE of TEXT_HTML)
or similar)? Must be an easy way but I'm missing it. Thanks!
andyg
12/28/2021, 4:34 AM
Filters!
Copy code
val contentTypeHTMLFilter : Filter = Filter { handler ->
{ handler(it).with(CONTENT_TYPE of TEXT_HTML) }
}