Net
Functions
httpRequest
Performs a regular HTTP or HTTPS request. To perform an HTTPS request, insert “https://” at the URL’s beginning. The default request method is GET, TCP connect timeout is 6 seconds and total request timeout is 90 seconds. Learn more about the limits.
Parameters
httpRequestAsync
Performs an asynchronous HTTP request. TCP connect timeout is 6 seconds and total request timeout is 90 seconds. Learn more about the limits.
Parameters
sendMail
Send email via the specified email server
Parameters
sendMailAsync
Send an email via a specified email server
Parameters
Types
HttpRequestOptions
Advanced HTTP request options.
optional
Optional. Timeout for the TCP connection to the address in seconds. The default value is 6. The value can be only decreased.
optional
Optional. Whether to enable logging the POST request body. The default value is false.
optional
Optional. Request headers: {‘Content-Type’: ‘text/html; charset=utf-8’, ‘User-Agent’: ‘YourCustomUserAgent/1.0’}. Note that the default value for the ‘User-Agent’ header is VoxEngine/1.0.
optional
HTTP request type as a string: GET, POST etc. The default value is GET.
optional
Optional. Request parameters. They can be specified in the URL itself as well.
optional
Optional. Raw UTF-8 encoded data string or an array of bytes in any encoding generated by str2bytes to send as the HTTP request body when ‘method’ is set to POST, PUT, or PATCH.
optional
Optional. Whether HttpRequestResult.data should contain a list of 1-byte numbers corresponding to the HTTP response data. If set to false, HttpRequestResult.data is undefined.
optional
Optional. Timeout for getting a response to the request in seconds. The default value is 90. The value can be only decreased.
HttpRequestResult
HTTP response.
Response code. HTTP code (2xx-5xx) or one of our internal status codes
0: Voxengine limits are violated (e.g. HTTP request count exceeded)-1: Unknown error-2: Malformed URL-3: Host not found-4: Connection error-5: Too many redirects-6: Network error-7: Timeout-8: Internal error-9: Server response is larger than 2 MB
optional
If HttpRequestOptions.rawOutput is true, data contains a list of 1-byte numbers corresponding to HTTP response data. If HttpRequestOptions.rawOutput is false, data is undefined.
optional
In case of an error contains the error description
optional
List of dictionaries with key and value fields representing HTTP headers returned by the remote server
optional
HTTP header string returned by the remote server, without processing
optional
HTTP response body if Content-Type is not binary
SendMailOptions
Advanced options for sendMail method
optional
BCC addresses
optional
CC addresses
optional
Alternative HTML body
Login for mail server
Password for mail server
Mail server port
SendMailResult
Result of sending an email
SMTP server response code
optional
Optional. SMTP server error message