# TIP: Turbo-stream with HTTP Responses (including GET)

**URL:** <https://discuss.hotwired.dev/t/tip-turbo-stream-with-http-responses-including-get/3393>\
**Category:** General\
**Created:** [October 19, 2021, 11:45pm UTC](https://discuss.hotwired.dev/t/tip-turbo-stream-with-http-responses-including-get/3393 "2021-10-19T23:45:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tleish](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/tleish/32/920_2.png) [@tleish](https://discuss.hotwired.dev/u/tleish)\
**Post date:** [October 19, 2021, 11:45pm UTC](https://discuss.hotwired.dev/t/tip-turbo-stream-with-http-responses-including-get/3393/1 "2021-10-19T23:45:19Z")

</div>

Many incorrectly believe that turbo-streams only work with WebSockets. The [Turbo Handbook - Streaming from HTTP Responses](https://turbo.hotwired.dev/handbook/streams#streaming-from-http-responses) explains how to use turbo-streams with non-GET requests. We’ve discovered it’s possible to also use turbo-streams with GET requests using turbo-frames. We use this technique for pagination.

The following table might help explain how.

| 1. Turbo sends a _fetch request_ to the server with: |
| ...`POST`, `PUT`, `PATCH`, or `DELETE` | ...turbo-frame `GET`. |
| 2. The server responds with html: |
| 
```
\<turbo-stream...target="messages"\>\<template\>\<divid="message\_1"\>This div will be appended.\</div\>\</template\>\</turbo-stream\>
```
 | 
```
\<turbo-frameid="turbo\_frame\_message\_1"\>\<turbo-stream... target="messages"\>\<template\>\<divid="message\_1"\>This div will be appended.\</div\>\</template\>\</turbo-stream\>\</turbo-frame\>
```
 |
| 3. Turbo appends the turbo-stream HTML |
| ...to the document. | ...inside the matching turbo-frame#id. |
| 4. Turbo detects the DOM mutation includes a turbo-stream. It processes the turbo-stream action (append, replace, delete, etc.) and removes the turbo-stream element from the DOM (so it does not process it again). |
