We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35487c5 commit ed137ecCopy full SHA for ed137ec
1 file changed
libs/js/io/file-server/file-server.html
@@ -107,7 +107,19 @@ <h1>
107
108
<code>
109
110
- fetch('https://localhost:3000/a.txt',{headers:{mode:'load',auth:'my-auth'}})
+ var fs = await import();
111
+
112
+ fs.url = 'localhost';
113
+ fs.port = 3000;
114
+ fs.auth = 'my-auth';
115
116
+ var {blob,error} = await fs.file.load('a.txt');
117
+ if(error){
118
+ console.error(error);
119
+ return;
120
+ }
121
+ var txt = await blob.text();
122
+ console.log(txt);
123
124
</code>
125
0 commit comments