mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-13 14:30:02 -04:00
11 lines
296 B
JavaScript
11 lines
296 B
JavaScript
async function test() {
|
|
await libcurl.fetch("https://www.example.com/");
|
|
let promises = [];
|
|
for (let i=0; i<10; i++) {
|
|
promises.push((async ()=>{
|
|
let r = await libcurl.fetch("https://www.example.com/");
|
|
await r.text();
|
|
})())
|
|
}
|
|
await Promise.all(promises);
|
|
}
|