[HTTP_GetFile] downloads a named file from a remote HTTP server and creates a local file.
The -URL parameter is required to specify the name of the remote file to fetch. The -File parameter is required to specify the name of the local file to create. An optional -Username and -Password can be specified for authentication on the remote server. File permissions are required in order to create the file locally.
If the optional -Binary parameter is specified then the tag does not create a local file. Instead it returns the bytes of the downloaded file as the return value of the tag. The -File parameter is ignored if the -Binary parameter is specified.
[HTTP_GetFile: -URL='http://www.example.com/myfile.zip', -File='/folder/myfile.zip', -Username='Username', -Password='Password']
[HTTP_GetFile: -URL='http://www.example.com/myfile.zip', -Binary, -Username='Username', -Password='Password']
The following example downloads a file named download.zip from the URL http://www.example.com/download.zip to the local documents folder.
[HTTP_GetFile: -URL='http://www.example.com/download.zip', -File='/documents/download.zip']
The following example downloads a file named download.zip at http://www.example.com:1024/private/download.zip where a username and password are required to access to the private folder.
[HTTP_GetFile: -URL='http://www.example.com:1024/private/download.zip', -File='/documents/download.zip', -Username='my_username', -Password='my_password']
Tag Link | [HTTP_GetFile] | Category | Utility |
---|---|---|---|
Type | Process | Data Source | Any |
Support | Preferred | Version | 6.0 |
Output Type | None, Bytes | Security | File Tags |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0 |
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft