Skip to content

Remote call plugin

This plugin calls remote API.

Configuration

{
  "method": "post",
  "source": {
    "id": "<id-of-API-resource>",
    "name": "<name-of-API-resource>"
  },
  "endpoint": "/some/endpoint/{[email protected]}/here",
  "timeout": 30,
  "headers": {
    "X-Customer-Header": "Header value"
  },
  "cookies": {
    "Cookie-Key": "Cookie value"
  },
  "sslCheck": true,
  "body": {
    "content": "{\"json\":1}",
    "type": "application/json"
  }
}

This configuration makes POST request to API URL from selected resource with body {"json":1}.

If user requires the body to be sent with GET method than body will be squashed to represent keys and values.

For example this JSON:

{
  "payload": {
    "mobile": "android"
  },
  "version": [
    10,
    11
  ]
}

Will be flattened to parameters:

payload.mobile=android&version=10&version=11

This plugin supports dot paths in cookie headers and body - you can use them like this:

{
  "headers": {
    "X-Custom-Header": "[email protected]"
  }
}

Paths will be replaced with current workflow values.

Result

This plugin returns either the response (on response port) or and error on error port.

Example of valid response

{
  "status": 200,
  "content": "<body>",
  "cookies": {
    "key": "value"
  }
}