Otter Documentation

General - Download File from URL

  • Last Modified: 2018-09-21

This is generated from the built-in components of Otter 2.0, and may be different than what you have installed (especially if you have extensions); go to [User Icon] > Documentation within your Otter instance to see exactly what operations are available.

Download File from URL

Downloads a file from a specified URL using an HTTP GET.

Operation type:

Executing - this operation will perform a specified action or actions on a remote server.

Script usage:

Download-Http(
	FileName: <text>,
	Url: <text>,
	[LogResponseBody: <true/false>],
	[ErrorStatusCodes: <text>],
	[ResponseBody: <text>],
	[RequestHeaders: <%(key1: value1, ...)>],
	[MaxResponseLength: <integer>],
	[ProxyRequest: <true/false>],
	[UserName: <text>],
	[Password: <text>]
);

This operation may be prefixed with HTTP::, although this is a built-in namespace and isn't really necessary.

Arguments:

Name Format Script Usage Usage Notes
File name
text
FileName
The destination path for the downloaded file. This argument is required.
URL (default)
text
Url
This argument is required.
Log response body
true/false
LogResponseBody
Error status codes
text
ErrorStatusCodes
Comma-separated status codes (or ranges in the form of start:end) that should indicate this action has failed. For example, a value of "401,500:599" will fail on all server errors and also when "HTTP Unauthorized" is returned. The default is 400:599.
Store response as
text
ResponseBody
Request headers
%(key1: value1, ...)
RequestHeaders
Max response length
integer
MaxResponseLength
Use server in context
true/false
ProxyRequest
When selected, this will proxy the HTTP calls through the server is in context instead of using the server Otter or BuildMaster is installed on. If the server in context is SSH-based, then an error will be raised.
User name
text
UserName
Password
text
Password

Example:

# downloads a file from example.org service endpoint
Download-Http http://example.org/upload-service/v3/hdars (
    To: ReleaseNotes.xml
);

Have a question? Try the Q&A Forum

Our documentation is now Open Source and on GitHub. We highly encourage our users to contribute and get involved! .