Skip to content

Commit 775697f

Browse files
committed
Add support for responseKind "turbo-stream"
1 parent 8c63adf commit 775697f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/request.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,16 @@ export class Request {
4949
} else if (this.body instanceof window.File) {
5050
return this.body.type
5151
} else {
52-
return 'application/octet-stream'
52+
return 'application/json'
5353
}
5454
}
5555

5656
get accept () {
5757
switch (this.responseKind) {
5858
case 'html':
5959
return 'text/html, application/xhtml+xml'
60+
case 'turbo-stream':
61+
return 'text/vnd.turbo-stream.html, text/html, application/xhtml+xml'
6062
case 'json':
6163
return 'application/json'
6264
default:

0 commit comments

Comments
 (0)