|
7 | 7 |
|
8 | 8 | <head> |
9 | 9 | <meta charset=utf-8> |
10 | | - |
| 10 | + |
11 | 11 | <title> |
12 | 12 | Fetch Download Stream |
13 | 13 | </title> |
14 | | - |
| 14 | + |
15 | 15 | <meta name=description content='Learn how to consume a download stream using the Fetch API in JavaScript. This guide covers handling readable streams, processing binary data, and saving files efficiently from network responses.'> |
16 | 16 | <link rel=icon type='image/png' href='/blog/image/blog-30.png'> |
17 | 17 | <meta name=viewport content='width=device-width, initial-scale=1'> |
18 | 18 |
|
19 | 19 | <base href='https://ext-code.com/blog/25-07-31/fetch-download-stream/'> |
20 | 20 | <link rel=canonical href='https://ext-code.com/blog/25-07-31/fetch-download-stream/fetch-download-stream.html'> |
21 | 21 |
|
22 | | - |
| 22 | + |
23 | 23 | <script type='application/ld+json'> |
24 | 24 |
|
25 | 25 | { |
|
33 | 33 | "mainEntityOfPage" : {"@type":"WebPage","@id":"https://ext-code.com/blog/25-07-31/fetch-download-stream/fetch-download-stream.html"}, |
34 | 34 | "publisher" : {"@type":"Organization","name":"Your Blog or Company Name","logo":{"@type":"ImageObject","url":"https://ext-code.com/favicon.ico"}}, |
35 | 35 | } |
36 | | - |
| 36 | + |
37 | 37 | </script> |
38 | 38 | <!-- |
39 | 39 | "image" : "https://yourdomain.com/images/http2-nodejs-demo.png" |
|
46 | 46 |
|
47 | 47 |
|
48 | 48 | <script src='https://ajaxorg.github.io/ace-builds/src-noconflict/ace.js'></script> |
49 | | - |
50 | | - |
51 | | - <script src='https://libs.ext-code.com/js/dom/component/component.js'></script> |
52 | | - <script src='https://libs.ext-code.com/js/dom/init-hdr/init-hdr.js'></script> |
53 | | - |
54 | | - |
| 49 | + |
| 50 | + |
| 51 | + <script src='https://libs.ext-code.com/js/dom/component/v3.0/component.js?hdr'></script> |
| 52 | + |
| 53 | + |
55 | 54 | <link rel=stylesheet href='/blog/css/blog.css'> |
56 | | - |
| 55 | + |
57 | 56 | <style> |
58 | 57 |
|
59 | 58 | html |
|
68 | 67 | [component] |
69 | 68 | {display:none} |
70 | 69 |
|
71 | | - .description |
| 70 | + .description |
72 | 71 | {max-width:1000px;text-align:justify;border-left:4px solid #4a90e2;padding:1rem; |
73 | 72 | background-color:#f9f9f9;font-family:system-ui,sans-serif;font-size:1rem;line-height:1.6;color:#333} |
74 | 73 | .description>p |
75 | 74 | {margin:0} |
76 | 75 | .description > p+p |
77 | 76 | {margin:10px 0} |
78 | | - |
| 77 | + |
79 | 78 | code |
80 | 79 | {font-family:monospace;background:whitesmoke} |
81 | 80 | code.inline |
82 | 81 | {display:inline;padding:5px 10px} |
83 | | - |
| 82 | + |
84 | 83 | a |
85 | 84 | {color:#4a90e2;text-decoration:none;font-weight:500} |
86 | | - a:hover |
| 85 | + a:hover |
87 | 86 | {text-decoration:underline} |
88 | 87 | .link-domain |
89 | 88 | {font-size:0.85rem;color:#777;margin-left:0.25rem} |
90 | | - .link-domain::before |
| 89 | + .link-domain::before |
91 | 90 | {content:'['} |
92 | 91 | .link-domain::after |
93 | 92 | {content:']'} |
94 | 93 | .link-txt |
95 | 94 | {} |
96 | | - |
| 95 | + |
97 | 96 | input |
98 | 97 | {font-size:16px;padding:5px 7px;box-sizing:border-box;} |
99 | 98 | input[type=button] |
100 | 99 | {cursor:pointer} |
101 | | - |
102 | | - |
103 | | - |
| 100 | + |
| 101 | + |
| 102 | + |
104 | 103 | editor-root |
105 | 104 | {border:2px solid #4a90e2;padding:10px} |
106 | 105 |
|
|
111 | 110 |
|
112 | 111 |
|
113 | 112 | <body> |
114 | | - |
115 | | - <blog-hdr component=grp1> |
| 113 | + |
| 114 | + <blog-hdr component=grp1> |
116 | 115 | <h1 class=title> |
117 | 116 | Fetch Download Stream |
118 | 117 | </h1> |
119 | 118 | <time slot=date datetime=2025-10-23> |
120 | 119 | 23 Oct 2025 |
121 | 120 | </time> |
122 | 121 | </blog-hdr> |
123 | | - |
124 | | - |
125 | | - |
126 | | - |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
127 | 126 | <div class=description> |
128 | 127 | <p> |
129 | 128 | Learn how to consume a download stream using the Fetch API in JavaScript. This guide covers handling readable |
130 | 129 | streams, processing binary data, and saving files efficiently from network responses. |
131 | 130 | </p> |
132 | 131 | </div> |
133 | | - |
| 132 | + |
134 | 133 |
|
135 | 134 | <snippet-html-console id=ex src='ex/ex.html' component></snippet-html-console> |
136 | | - |
| 135 | + |
137 | 136 |
|
138 | 137 | </body> |
139 | 138 |
|
|
0 commit comments