Downloading Files Over HTTP
The Fake.Net.Http
module provides a functionality to download files over HTTP.
Including the Fake.Net.Http dependency
In order to open the Fake.Net.Http
module from a build script you have to add a Fake.Net.Http
dependency into your
paket.dependencies
file:
1: 2: 3: 4: 5: 6: 7: |
|
Please see more details on referencing FAKE 5 modules here.
Downloading a Single File
To download a single file over HTTP use downloadFile
from the Http module:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: |
|
A console output should be:
1: 2: 3: |
|
Downloading Multiple Files
To download multiple files in parallel use downloadFiles
from the Http module:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: |
|
A console output should be:
1: 2: 3: 4: |
|
More Details
-
downloadFile
anddownloadFiles
throw an Exception and fail a FAKE Target if any error occurs (invalid URI, invalid local file path/permissions, etc.) - file with the same name will be overwritten if exists in the target location
val printfn : format:Printf.TextWriterFormat<'T> -> 'T
type 'T list = List<'T>