@runnerty/executor-http

1.2.0 • Public • Published

HTTP executor for Runnerty:

Configuration sample:

{
  "id": "http_default",
  "type": "@runnerty-executor-http"
}

Plan sample:

{
  "id": "http_default",
  "headers": { "User-Agent": "runnerty" },
  "method": "GET",
  "uri": "https://api.github.com/search/repositories",
  "qs": { "q": "runnerty" },
  "json": true
}
{
  "id": "http_default",
  "headers": { "User-Agent": "runnerty" },
  "method": "GET",
  "uri": "https://raw.githubusercontent.com/runnerty/runnerty/master/README.md",
  "responseToFile": "/etc/runnerty/runnerty_readme.md"
}
{
  "id": "http_default",
  "headers": { "User-Agent": "runnerty" },
  "method": "GET",
  "uri": "https://api.twitter.com/1.1/users/show.json",
  "oauth": {
    "consumer_key": "...",
    "consumer_secret": "...",
    "token": "...",
    "token_secret": "..."
  },
  "qs": { "screen_name": "runnerty" },
  "json": true
}
{
  "id": "http_default",
  "headers": { "User-Agent": "runnerty" },
  "uri": "http://www.sample.com/form",
  "method": "POST",
  "form": {
    "key1": "value1",
    "key2": "value2"
  },
  "json": true
}
{
  "id": "http_default",
  "headers": { "User-Agent": "runnerty" },
  "uri": "http://www.sample.com/uploadfile",
  "method": "POST",
  "files": [
    { "name": "fileOne", "path": "/var/myfile.txt" },
    { "name": "fileTwo", "path": "/var/www/runnerty.jpg" }
  ],
  "json": true
}
{
  "id": "http_default",
  "headers": { "User-Agent": "runnerty", "Content-Type": "application/xml" },
  "method": "POST",
  "uri": "https://sample.com/api-sample",
  "auth": {
    "user": "@GV(MY_USER_AUTH)",
    "pass": "@GV(MY_PASS_AUTH)"
  },
  "body": "@GV(SAMPLE_BODY)"
}

Other considerations

If the result is very large, you should consider using the "noReturnDataOutput" (boolean) property to prevent a large amount of data from entering memory and being interpreted by Runnerty, which could cause performance problems.

{
  "id": "http_default",
  "headers": { "User-Agent": "runnerty" },
  "method": "GET",
  "uri": "http://host.com/big_file.zip",
  "responseToFile": "/etc/runnerty/big_file.zip",
  "noReturnDataOutput": true
}

install

npm i @runnerty/executor-http

Downloadsweekly downloads

6

version

1.2.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability