Skip to main content

This plugin calls remote API.

Project description

Remote call plugin

This plugin calls remote API.

Configuration

{
  "method": "post",
  "url": "http://localhost:80/API",
  "timeout": 30,
  "headers": {
    "X-Customer-Header": "Header value"
  },
  "cookies": {
    "Cookie-Key": "Cookie value"
  },
  "sslCheck": true,
  "body": {
    "content": "{\"json\":1}",
    "type": "application/json"
  }
}

This configuration defines API url as POST "http://loclhost:80/API" 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&verison=11

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"
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tracardi-remote-call-0.6.0.tar.gz (8.3 kB view hashes)

Uploaded Source

Built Distribution

tracardi_remote_call-0.6.0-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page