Package io.micronaut.views.turbo
Class TurboStreamFilter
java.lang.Object
io.micronaut.views.turbo.TurboStreamFilter
@Requires(classes=io.micronaut.http.HttpRequest.class)
@ServerFilter("/**")
public class TurboStreamFilter
extends Object
For routes annotated with
TurboView
sets the response body to a TurboStream.Builder
.- Since:
- 4.1.0
- Author:
- Sergio del Amo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
filterResponse
(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse<?> response) For routes annotated withTurboView
sets the response body to aTurboStream.Builder
.
-
Constructor Details
-
TurboStreamFilter
public TurboStreamFilter()
-
-
Method Details
-
filterResponse
@ResponseFilter public void filterResponse(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse<?> response) For routes annotated withTurboView
sets the response body to aTurboStream.Builder
.- Parameters:
request
- HttpRequestresponse
- Mutable HTTP Responses
-