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 Details

    • TurboStreamFilter

      public TurboStreamFilter()
  • Method Details

    • filterResponse

      @ResponseFilter public void filterResponse(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse<?> response)
      For routes annotated with TurboView sets the response body to a TurboStream.Builder.
      Parameters:
      request - HttpRequest
      response - Mutable HTTP Responses