Web Functions


Get

Get(URL)

Performs an HTTP GET request to URL and returns the response body as a string.

Returns: String (response body)

Examples:

Dim response = Get("http://api.example.com/status")
Dim json = Get("https://api.example.com/data?id=" & RecordID)

Post

Post(URL, data)

Performs an HTTP POST request to URL with the given body data. Returns the response body as a string.

Parameter Description
URL The endpoint URL
data The request body (sent as plain text)

Returns: String (response body)

Examples:

Dim result = Post("http://api.example.com/submit", "name=Alice&value=42")
Dim json = Post("https://api.example.com/data", "{""id"":1}")

Totp

Totp(base32Secret)

Generates a Time-based One-Time Password (TOTP) using the HMAC-SHA1 algorithm (RFC 6238). The code is valid for a 30-second window and is 6 digits long.

Parameter Description
base32Secret The Base32-encoded shared secret

Returns: String (6-digit TOTP code, zero-padded)

Examples:

Dim code = Totp("JBSWY3DPEHPK3PXP")
Post("https://api.example.com/login", "user=alice&otp=" & code)

Note: The secret must be a valid Base32 string (characters A–Z and 2–7). The generated code matches standard authenticator apps (Google Authenticator, Authy, etc.).