Upload File to URL
  • 25 Aug 2023
  • 1 Minute to read
  • Dark
    Light
  • PDF

Upload File to URL

  • Dark
    Light
  • PDF

Article Summary

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

Upload File to URL

Uploads a file to a specified URL using an HTTP POST or PUT.

Script usage:

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

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

Arguments:

NameFormatScript UsageUsage Notes
Method
integer
Method
☆ File name (default)
text
FileName
The path of the file to upload. This argument is required.
☆ URL
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 in it's 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.
Credentials
text
Credentials
User name
text
UserName
Password
text
Password
Ignore SSL Errors
true/false
IgnoreSslErrors

Example:

# uploads a file to example.org service endpoint
Upload-Http ReleaseNotes.xml (
    To: http://example.org/upload-service/v3/hdars
);

Was this article helpful?