How to get a file name from the server when downloading a file?
The server has a Content-Disposition property, how to get it, and is used when downloading files
Steps to reproduce
$URL=@'
https://skydrive.live.com/download?resid=A78ACCAEBB24EDD7!37948&authkey=!AKjXpDoxgONjhUw
'@
Iwr $URL -outfile ./
Or
$a=Iwr $URL -outfile ./sss
Expected behavior
Autoaddfilename
Or
PS >$a.headers
Key Value
--- -----
x-amz-id-2 {XAI956ZLVN5q12SAfXINuiiU6rUrLD0w88mtCcMt1uLcwwv…
x-amz-request-id {3EE4C53FE4416D0E}
Date {Fri, 24 Jan 2020 08:36:04 GMT}
ETag {"c4ac8566c3831011ab981c9662b33183"}
Accept-Ranges {bytes}
Server {AmazonS3}
Last-Modified {Wed, 18 Dec 2019 08:27:16 GMT}
Content-Disposition {attachment; filename=OpenSSH-Win32.zip}
Content-Type {application/octet-stream}
Content-Length {3018600}
Actual behavior
Environment data
How to get a file name from the server when downloading a file?
The server has a
Content-Dispositionproperty, how to get it, and is used when downloading filesSteps to reproduce
Expected behavior
Actual behavior
Environment data