Skip to content

Commit a3493d9

Browse files
authored
Merge pull request #7680 from SKhajeh/patch-11
fixed an issue with the example for the "getWritableStream()" method
2 parents e97a8ec + b06a5cc commit a3493d9

File tree

1 file changed

+1
-0
lines changed
  • packages/docs/src/routes/docs/(qwikcity)/middleware

1 file changed

+1
-0
lines changed

packages/docs/src/routes/docs/(qwikcity)/middleware/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ Set stream response.
606606
import type { RequestHandler } from '@builder.io/qwik-city';
607607

608608
export const onGet: RequestHandler = async (requestEvent) => {
609+
requestEvent.headers.set('content-type','text/event-stream')
609610
const writableStream = requestEvent.getWritableStream();
610611
const writer = writableStream.getWriter();
611612
const encoder = new TextEncoder();

0 commit comments

Comments
 (0)