Request

Label: :IA_Function
Property: type: Request
Inherits from: Function

Performs an HTTP request to an external url.

Parameters

Key Description Default value Possible values
allowFailure If set to true, a failed request will not throw an error. true/false/1/0
auth.username Basic authentication username string
auth.password Basic authentication password string
data Payload or parameters to send with the request. object or string
download The response will be downloaded as a file true/false
downloadName Downloaded file default name download string
headers Headers to send with the request. object
method HTTP method GET GET/POST/PUT/DELETE/OPTIONS/CONNECT
params Parameters to be encoded into the url object
serverSide Will execute the request from the server. If set to true, url will only be read directly from the Request node, and download will not work. false true/false
timeout Timeout after which to give up the request attempt (in ms) 30000 number
url Target url to perform the HTTP request to. string (url)

Other parameters

This Function is a wrapper for the $.ajax jQuery function. Other than the parameters described above, the following parameters to the $.ajax function are supported (please refer to the jQuery documentation for their use):

  • accepts
  • cache
  • contents
  • contentType
  • converters
  • crossDomain
  • data
  • dataType
  • headers
  • ifModified
  • method
  • mimeType
  • password
  • processData
  • timeout
  • traditional
  • url
  • username
  • xhrFields

Outgoing triggers

Type: success

Fires when the request was successfully completed, and the response was received.

Additional event properties (besides the inherited properties):

Key Description Possible values
completed Indicates that the request was completed true
response The response to the request object
response.status The HTTP status of the request 200
response.statusText The HTTP status text of the request OK
response.data The response data object/string

Type: fail

Fires when the request was completed, but with errors.

Additional event properties (besides the inherited properties):

Key Description Possible values
completed Indicates that the request was completed true
response.status The HTTP status of the request HTTP status codes
response.statusText The HTTP status text of the request HTTP status texts
response.data The response data object/string
response.error The reported error message in the response (if any) string