Downloading a file
szymon-rd opened this issue · 1 comments
szymon-rd commented
Make sure that there is a good DX when downloading a file + add a tutorial on that.
lihaoyi commented
FWIW this is a one-liner using os-lib and requests-scala, including (lack of) imports, streaming the file contents directly to disk
$ amm
Loading...
Welcome to the Ammonite Repl 2.5.4 (Scala 2.13.8 Java 17.0.6)
@ os.write(os.pwd / "file.html", requests.get.stream("https://www.lihaoyi.com/"))