RestService(url, params?, method = ‘GET’, user?, password?, timeout?, headers?, binary = false, allowReadOnlyPost = false, session = false)
Alias: Ajax
Calls REST service and returns the response object.
RestService Parameters
url : Url
Target URL; alternatively an array of argument arrays to run in parallel.
params? : Dict?
Parameters dictionary.
method : String? = ‘GET’
HTTP method (can be GET, POST, PUT, PATCH, DELETE, Post.Json, Put.Json or Patch.Json).
user? : String?
User name for basic auth.
password? : String?
Password for basic auth.
timeout? : Integer
Timeout in seconds.
headers? : Dict?
Custom headers (set any header to null to remove default one).
binary : Boolean = false
True to get result as binary file.
allowReadOnlyPost : Boolean = false
True to allow POST-like methods in readonly mode.
session : Boolean = false
True to use session (keep and use cookies).
RestService Examples
var result = RestService('https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41¤t=temperature_2m,wind_speed_10m');
var data = [result.current.temperature_2m, result.current.wind_speed_10m];
SendEmail(email, subject, body, fromName?, attachments?, cc?, bcc?, emlName?)
Sends e-mail to specified mailbox.
SendEmail Parameters
email : ?
Email address(es) to send mail to (can be string or array of strings).
subject : String
Subject of the message.
body : String
HTML message body.
fromName? : String?
Sender name or/and email.
attachments? : []?
Files to attach.
cc? : ?
Carbon Copy address(es).
bcc? : ?
Blind Carbon Copy address(es).
emlName? : ?
Set to not send email and return generated .eml file.
SendEmail Examples
var ok = SendEmail('person@mailbox.com', 'Subject', 'Text content');
var ok = SendEmail('person@mailbox.com', 'Subject', 'Text content', null, [File('res:///internal/attachment.pdf')]);
SendEml(document, altview = false) : Boolean
Sends EML message.
SendEml Parameters
document : Resource
Document resource file to send (*.eml).
altview : Boolean = false
True to use alternate views for body.