Hotwire
Small helpers for working with Hotwire Turbo streams.
Response.turboStream
Marks an existing response as a Turbo Stream by replacing its Content-Type with
text/vnd.turbo-stream.html.
- Example
- Declaration
renderTemplate(request, "items/_row", model).turboStream()
fun Response.turboStream(): Response
turboStreamRefresh
Returns a Turbo Stream response with a <turbo-stream action="refresh"> body, used to ask the client
to perform a full page refresh.
- Declaration
fun turboStreamRefresh(): Response