Closed brendon closed 2 weeks ago
Let me know if you need any further testing done, or have any concerns with this change. I've been using it in development and it's working really well. Much cleaner than fake-clicking hidden submit buttons ;)
Hi @marcelolx, just wondering if you'd be able to make a new release with this change in it? :)
@brendon I will once we get to merge https://github.com/rails/request.js/pull/72 as well
@brendon Done
Thanks @marcelolx :D
Checks for
window.Turbo
and if theresponseKind
isturbo-stream
and if both are true thenrequest.js
will usewindow.Turbo.fetch
in order to appendX-Turbo-Request-Id
to the request headers.The tests don't actually bring in Turbo just as the existing tests don't.
window.Turbo.fetch
as at time of writing: https://github.com/hotwired/turbo/blob/4d65288e913d5a5428e290781313c7909763b133/src/http/fetch.jsCloses: https://github.com/rails/request.js/issues/73