io.input.url
info
io.input.url
is available on SDK versions v0.24.0 and higher.
Requests a URL.
The URL is validated on the client and an error is shown if the provided value is not a URL. You can perform additional URL validation by using the validation API.
Returns a URL object in Node and a urllib parse result in Python.
Usage
- TypeScript
- JavaScript
- Python Experimental
const redirectUrl = await io.input.url("Redirect URL", {
helpText: "Please provide a URL for the redirect.",
placeholder: "https://example.com",
allowedProtocols: ["https"],
});
return redirectUrl.href;
const redirectUrl = await io.input.url("Redirect URL", {
helpText: "Please provide a URL for the redirect.",
placeholder: "https://example.com",
allowedProtocols: ["https"],
});
return redirectUrl.href;
redirect_url = await io.input.url("Redirect URL",
help_text="Please provide a URL for the redirect.",
placeholder="https://example.com",
allowed_protocols=["https"],
)
interval.com
Props
- TypeScript
- JavaScript
- Python Experimental
allowedProtocols
Optional
array
Optional array of allowed protocols. Default are http and https.
defaultValue
Optional
string
Default value for the input.
disabled
Optional
boolean
Whether the input is disabled, preventing edits to the `defaultValue`.
helpText
Optional
string
Secondary label for providing additional context.
placeholder
Optional
string
Text to display in the input when no value is set.
Returns
URL
allowedProtocols
Optional
array
Optional array of allowed protocols. Default are http and https.
defaultValue
Optional
string
Default value for the input.
disabled
Optional
boolean
Whether the input is disabled, preventing edits to the `defaultValue`.
helpText
Optional
string
Secondary label for providing additional context.
placeholder
Optional
string
Text to display in the input when no value is set.
Returns
URL
allowed_protocols
Optional
Iterable[str]
Optional array of allowed protocols. Default are http and https.
default_value
Optional
bool
Default value for the input.
disabled
Optional
bool
Whether the input is disabled, preventing edits to the `defaultValue`.
help_text
Optional
str
Secondary label for providing additional context.
placeholder
Optional
str
Text to display in the input when no value is set.
Returns
urllib.parse.ParseResult
Did this section clearly explain what you wanted to learn?