-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding X-Turbo-Request-Id support #73
Comments
I've reported the spam comment. In the meantime it might be easiest to allow for providing our own fetch function? request.js/src/fetch_request.js Line 22 in 11a0cd9
I can work around this by doing:
|
So, could you explain the use case where we need the |
I'm using That's the simplest case that can't easily be done in another way. |
Plus you provide the ability to send turbo requests, so it makes sense to account for this change in behaviour from the turbo side. |
I went ahead and did a PR. Hopefully it's low touch enough :) |
I see, so Turbo will behave this way if the Thanks for bringing this up, I will take a look at the PR, but I believe it should be ok using Turbo's fetch in those scenarios. |
Thanks @marcelolx :) I appreciate you taking the time to review and merge the PR :) |
Turbo requests now keep track of a set of the last 20 or so requests and submits an ID for each turbo request to the server so that if a response is broadcast back to browsers the initiating browser can ignore the page reload update:
https://github.com/hotwired/turbo/blob/main/src/http/fetch.js
It would be useful to hook into this functionality in
request.js
. Would you be open to that?Hopefully it's a case of just optionally importing the augmented
fetch
from the above file? I'm sure it could be complicated though :DThe text was updated successfully, but these errors were encountered: