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
+7-1
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,7 @@ Accepts `Object`, `FormData` or `URLSearchParams`.
102
102
103
103
Specifies which response format will be accepted. Default is `html`.
104
104
105
-
Options are `html`, `turbo-stream`, `json`.
105
+
Options are `html`, `turbo-stream`, `json`, and `script`.
106
106
107
107
#### Turbo Streams
108
108
@@ -115,6 +115,12 @@ window.Turbo = Turbo
115
115
116
116
Since [v7.0.0-beta.6](https://github.com/hotwired/turbo/releases/tag/v7.0.0-beta.6) Turbo sets `window.Turbo` automatically.
117
117
118
+
Request.JS will also use Turbo's `fetch` to include the `X-Turbo-Request-ID` header in the request (see [#73](https://github.com/rails/request.js/issues/73)).
119
+
120
+
#### Script Responses
121
+
122
+
Request.JS will automatically activate script tags in the response (see [#48](https://github.com/rails/request.js/issues/48)).
123
+
118
124
#### Request Interceptor
119
125
120
126
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:
0 commit comments