Download a resource to the filesystem using fetch and fs.createWriteStream, default method is GET
fetch
fs.createWriteStream
GET
Optional
Time it took to download in ms
import { network } from "@rjweb/utils"await network.download('http://speedtest.belwue.net/random-1G', '/tmp/1gb.test') // 14314.149778962135 Copy
import { network } from "@rjweb/utils"await network.download('http://speedtest.belwue.net/random-1G', '/tmp/1gb.test') // 14314.149778962135
1.8.5
nodejs
Download a resource to the filesystem using
fetch
andfs.createWriteStream
, default method isGET