DownloadFile
Fetch file over HTTP.
Task version: 1.5.0
Required Frends version: 5.5+
Required .NET version: 6.0
Compatible Agents: Crossplatform
Task Parameters
Url : String
The URL with protocol and path.
You can include query parameters directly in the URL.
Default: https://example.org/path/to
Example: https://example.org/path/to
Headers : Header[]
List of HTTP headers to be added to the request.
Default: -
Example: [ { Name = "Content-Type", Value = "application/json" }, { Name = "Accept", Value = "application/json" } ]
FilePath : String
Exact location and name of the file to be created.
Default: -
Example: C:\temp\example.txt
Authentication : Authentication
Method of authenticating request.
Possible values:
None: Method of authenticating request.Basic: Method of authenticating request.WindowsAuthentication: Method of authenticating request.WindowsIntegratedSecurity: Method of authenticating request.OAuth: Method of authenticating request.ClientCertificate: Method of authenticating request.
Default: -
Example: OAuth
Username : String
If WindowsAuthentication is selected you should use domain\username
Default: -
Example: Username
🗝Password : String
Password for the user
Default: -
Example: Password123
🗝Token : String
Bearer token to be used for request.
Token will be added as Authorization header.
Default: -
Example: Token123
UseProxy : Boolean
Whether to route requests through a proxy server. When set to true, the ProxyUrl must be provided.
Default: False
Example: false
ProxyUrl : String
Proxy URL used for the request.
Default: -
Example: http://proxy.example.com:8080
ProxyUsername : String
Username for proxy authentication. Leave empty if proxy does not require authentication.
Both username and password must be provided together or left empty.
Default: -
Example: Username
🗝ProxyPassword : String
Password for proxy authentication. Leave empty if proxy does not require authentication.
Both username and password must be provided together or left empty.
Default: -
Example: Password123
ClientCertificateSource : CertificateSource
Specifies where the Client Certificate should be loaded from.
Possible values:
CertificateStore: Specifies where the Client Certificate should be loaded from.File: Specifies where the Client Certificate should be loaded from.String: Specifies where the Client Certificate should be loaded from.
Default: 0
Example: File
ClientCertificateFilePath : String
Applicable only when Certificate Source is "File".
Path to the Client Certificate, pfx (pkcs12) files are recommended. For other supported formats, see
https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x509certificate2collection.import?view=netframework-4.7.1
Default: -
Example: domain\path
ClientCertificateInBase64 : String
Applicable only when Certificate Source is "String".
Client certificate bytes as a base64 encoded string, pfx (pkcs12) format is recommended. For other supported formats, see
https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x509certificate2collection.import?view=netframework-4.7.1
Default: -
Example: domain\path
🗝ClientCertificateKeyPhrase : String
Applicable only when Certificate Source is "File" or "String".
Key phrase (password) to access the certificate data
Default: -
Example: string value
CertificateThumbprint : String
Applicable only when Certificate Source is "CertificateStore".
Thumbprint for using client certificate authentication.
Default: -
Example: thumbprint
CertificateStoreLocation : CertificateStoreLocation
Applicable only when Certificate Source is "CertificateStore".
Store location for the certificate.
Possible values:
CurrentUser: Applicable only when Certificate Source is "CertificateStore".
Store location for the certificate.
LocalMachine: Applicable only when Certificate Source is "CertificateStore".
Store location for the certificate.
Default: 0
Example: CurrentUser
LoadEntireChainForCertificate : Boolean
Should the entire certificate chain be loaded from the certificate store and included in the request. Only valid when using Certificate Store as the Certificate Source
Default: True
Example: true
ConnectionTimeoutSeconds : Int32
Timeout in seconds to be used for the connection and operation.
Default: 30
Example: 30
FollowRedirects : Boolean
If FollowRedirects is set to false, all responses with an HTTP status code from 300 to 399 is returned to the application.
Default: True
Example: true
AllowInvalidCertificate : Boolean
Do not throw an exception on certificate error.
Default: -
Example: true
AllowInvalidResponseContentTypeCharSet : Boolean
Some Api's return faulty content-type charset header. This setting overrides the returned charset.
Default: -
Example: true
ThrowExceptionOnErrorResponse : Boolean
Throw exception if return code of request is not successfull
Default: -
Example: true
AutomaticCookieHandling : Boolean
If set to false, cookies must be handled manually. Defaults to true.
Default: True
Example: true
HttpProtocolVersion : HttpVersion
HTTP protocol version to use for requests. HTTP/1.1 is the default and most compatible option.
Possible values:
Http11: HTTP protocol version to use for requests. HTTP/1.1 is the default and most compatible option.Http20: HTTP protocol version to use for requests. HTTP/1.1 is the default and most compatible option.
Default: 0
Example: Http11
SslProtocolVersion : SslVersion
SSL/TLS protocol version to use for secure connections. Default lets the OS decide, which matches previous behavior.
Use Tls12 or Tls12And13 if the server requires a specific version.
Possible values:
Default: SSL/TLS protocol version to use for secure connections. Default lets the OS decide, which matches previous behavior.
Use Tls12 or Tls12And13 if the server requires a specific version.
Tls12: SSL/TLS protocol version to use for secure connections. Default lets the OS decide, which matches previous behavior.
Use Tls12 or Tls12And13 if the server requires a specific version.
Tls13: SSL/TLS protocol version to use for secure connections. Default lets the OS decide, which matches previous behavior.
Use Tls12 or Tls12And13 if the server requires a specific version.
Tls12And13: SSL/TLS protocol version to use for secure connections. Default lets the OS decide, which matches previous behavior.
Use Tls12 or Tls12And13 if the server requires a specific version.
Default: 0
Example: Default
Overwrite : Boolean
If set to true, an existing file at the target path will be overwritten during download.
Default: False
Example: false
Task Result
Success : Boolean
Task complete.
Example: True
FilePath : String
Path to created file.
Example: C:\temp.txt
Task Changelog
Changelog for Task Frends.HTTP.DownloadFile.
[1.5.0] - 2026-05-13
Added
Added UseProxy, ProxyUrl, ProxyUsername, ProxyPassword, HttpProtocolVersion, and SslProtocolVersion options with proxy handler and protocol configuration support.
[1.4.0] - 2026-03-02
Added
Added CertificateStoreLocation option to allow selection between CurrentUser and LocalMachine certificate stores when using certificate authentication.
[1.3.0] - 2025-05-15
Changed
Added new Overwrite parameter to control whether the downloaded file should replace an existing one.
Use the default parameter value ('false') if you want the task to work as before.
[1.2.0] - 2025-03-25
Changed
Update packages: System.Runtime.Caching 7.0.0 -> 9.0.3 coverlet.collector 3.1.0 -> 6.0.4 Microsoft.NET.Test.Sdk 16.7.0 -> 17.13.0 MSTest.TestAdapter 2.1.2 -> 3.8.3 MSTest.TestFramework 2.1.2 -> 3.8.3
[1.1.0] - 2024-12-30
Changed
Descriptions of ClientCertificate suboptions includes clearer information about usage in terms of different types of ClientCertificate.
[1.0.0] - 2023-01-27
Added
Initial implementation.
Last updated
Was this helpful?

