Commit 13a141e
committed
feat(fetch): implement fetch body streams
Closes #946
Implements Response.body and Request.body as ReadableStream per WHATWG Fetch spec:
- Response.body returns ReadableStream<Uint8Array> for streaming response data
- Request.body returns ReadableStream<Uint8Array> for request bodies
- Byte stream controller (type: "bytes") with BYOB reader support
- Response.clone() uses tee() to allow cloning after body access
- fetch() accepts ReadableStream as request body for streaming uploads
- Compressed responses (gzip/deflate/brotli) stream decompressed data
- pipeTo() support for piping body streams to WritableStream
Added 42 new tests covering fetch body stream functionality.1 parent 605db49 commit 13a141e
File tree
16 files changed
+1777
-54
lines changed- modules
- llrt_fetch
- src
- llrt_stream_web/src
- readable
- stream
- tests/unit
- types
16 files changed
+1777
-54
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | | - | |
539 | | - | |
| 538 | + | |
540 | 539 | | |
541 | 540 | | |
542 | 541 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
88 | 101 | | |
89 | 102 | | |
90 | 103 | | |
| |||
93 | 106 | | |
94 | 107 | | |
95 | 108 | | |
96 | | - | |
| 109 | + | |
97 | 110 | | |
98 | 111 | | |
99 | 112 | | |
| |||
331 | 344 | | |
332 | 345 | | |
333 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
334 | 352 | | |
335 | 353 | | |
336 | 354 | | |
337 | 355 | | |
338 | | - | |
| 356 | + | |
339 | 357 | | |
340 | 358 | | |
341 | 359 | | |
| |||
395 | 413 | | |
396 | 414 | | |
397 | 415 | | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
402 | 422 | | |
403 | | - | |
404 | | - | |
405 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
406 | 432 | | |
407 | 433 | | |
408 | 434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
82 | | - | |
83 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
| |||
142 | 148 | | |
143 | 149 | | |
144 | 150 | | |
145 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
146 | 156 | | |
147 | 157 | | |
148 | | - | |
149 | | - | |
| 158 | + | |
| 159 | + | |
150 | 160 | | |
151 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
152 | 177 | | |
153 | 178 | | |
154 | 179 | | |
| |||
169 | 194 | | |
170 | 195 | | |
171 | 196 | | |
| 197 | + | |
172 | 198 | | |
173 | 199 | | |
174 | 200 | | |
| |||
252 | 278 | | |
253 | 279 | | |
254 | 280 | | |
| 281 | + | |
255 | 282 | | |
256 | 283 | | |
257 | 284 | | |
| |||
288 | 315 | | |
289 | 316 | | |
290 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
291 | 325 | | |
292 | 326 | | |
293 | 327 | | |
| |||
361 | 395 | | |
362 | 396 | | |
363 | 397 | | |
364 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
365 | 404 | | |
366 | 405 | | |
367 | 406 | | |
| |||
0 commit comments