# Form submission without a \`text/vnd.turbo-stream.html\` Accept header?

**URL:** <https://discuss.hotwired.dev/t/form-submission-without-a-text-vnd-turbo-stream-html-accept-header/4102>\
**Category:** General\
**Created:** [May 5, 2022, 8:45am UTC](https://discuss.hotwired.dev/t/form-submission-without-a-text-vnd-turbo-stream-html-accept-header/4102 "2022-05-05T08:45:44Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Sean](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@Sean](https://discuss.hotwired.dev/u/Sean)\
**Post date:** [October 17, 2023, 11:20pm UTC](https://discuss.hotwired.dev/t/form-submission-without-a-text-vnd-turbo-stream-html-accept-header/4102/4 "2023-10-17T23:20:27Z")

</div>

Also noted here: [Opting out of stream responses on a per form basis - #6 by Sean](https://discuss.hotwired.dev/t/opting-out-of-stream-responses-on-a-per-form-basis/2467/6)

I recently came across this issue and ended up adding support for `data-turbo-stream="false"` by using the following document wide event listener:

```auto
document.addEventListener("turbo:before-fetch-request", (event) => {
  if (event.target.dataset["turboStream"] == "false")
    event.detail.fetchOptions.headers["Accept"] = "text/html, application/xhtml+xml"
})

```

You use it like so:

```auto
<form ... data-turbo-stream="false">...</form>

```

---

_[View the full topic](https://discuss.hotwired.dev/t/form-submission-without-a-text-vnd-turbo-stream-html-accept-header/4102)._
