GetContentsOfURL
public struct GetContentsOfURL : Shortcut
Gets the contents of URLs passed into the action. Useful for downloading files and web content, or for making API requests.
Input: URLs
Result: (Files) The fetched data
-
The contents of the shortcut.
Declaration
Swift
public var body: some Shortcut { get }
-
Initializes the shortcut.
Declaration
Swift
public init(method: VariableValue<HTTPMethod>, url: Text, headers: KeyValuePairs<Text, Text> = [:], body: RequestBody?)
Parameters
method
The HTTP method to use, or a Variable representing one.
url
The URL to fetch.
headers
Custom request headers to send, if any.
body
The requset body. Unsupposed for GET requests.
-
Initializes the shortcut.
Declaration
Swift
public init(method: HTTPMethod, url: Text, headers: KeyValuePairs<Text, Text> = [:], body: RequestBody?)
Parameters
method
The HTTP method to use.
url
The URL to fetch.
headers
Custom request headers to send, if any.
body
The requset body. Unsupposed for GET requests.