我有以下功能下载文件。
let download url folder name =
use out = File.Create(Path.Combine(folder, name))
Http.RequestStream(url, cookieContainer = cc, headers = headers)
.ResponseStream.CopyTo(out)
但是,我需要另一个下载功能,只使用网站上的名称。如何获得名称?
let download url folder =
let name = .... // get from the default name set by the website?
use out = File.Create(Path.Combine(folder, name))
Http.RequestStream(url, cookieContainer = cc, headers = headers)
.ResponseStream.CopyTo(out)