You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-1Lines changed: 19 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -44,10 +44,28 @@ import { Turbo } from "@hotwired/turbo-rails"
44
44
window.Turbo= Turbo
45
45
```
46
46
47
+
#### Request Interceptor
48
+
49
+
To authenticate fetch requests (eg. with Bearer token) you can use request interceptor. It allows pausing request invocation for fetching token and then adding it to headers:
`FetchRequest` sets a `"X-Requested-With": "XmlHttpRequest"` header. If you have not upgraded to Turbo and still use `Turbolinks` in your Gemfile, this means
50
-
you will not be able to check if the request was redirected.
68
+
you will not be able to check if the request was redirected.
0 commit comments