{"id":21611281,"url":"https://github.com/runnerty/executor-http","last_synced_at":"2025-04-11T05:34:09.147Z","repository":{"id":25694175,"uuid":"91836340","full_name":"runnerty/executor-http","owner":"runnerty","description":"Runnerty module: HTTP executor","archived":false,"fork":false,"pushed_at":"2024-01-11T02:11:33.000Z","size":162,"stargazers_count":3,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T03:34:42.425Z","etag":null,"topics":["executor","http","https","request","runnerty"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/runnerty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-19T18:54:17.000Z","updated_at":"2022-11-21T15:53:16.000Z","dependencies_parsed_at":"2024-11-24T21:21:56.208Z","dependency_job_id":null,"html_url":"https://github.com/runnerty/executor-http","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runnerty%2Fexecutor-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runnerty%2Fexecutor-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runnerty%2Fexecutor-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runnerty%2Fexecutor-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/runnerty","download_url":"https://codeload.github.com/runnerty/executor-http/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247974733,"owners_count":21026742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["executor","http","https","request","runnerty"],"created_at":"2024-11-24T21:11:50.133Z","updated_at":"2025-04-11T05:34:09.123Z","avatar_url":"https://github.com/runnerty.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://runnerty.io\"\u003e\n    \u003cimg height=\"257\" src=\"https://runnerty.io/assets/header/logo-stroked.png\"\u003e\n  \u003c/a\u003e\n  \u003cp align=\"center\"\u003eSmart Processes Management\u003c/p\u003e\n\u003c/p\u003e\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url]\n\u003ca href=\"#badge\"\u003e\n\u003cimg alt=\"code style: prettier\" src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg\"\u003e\n\u003c/a\u003e\n\n# Executor for [Runnerty]: HTTP\n\n### Installation:\n\nThrough NPM\n\n```bash\nnpm i @runnerty/executor-http\n```\n\nYou can also add modules to your project with [runnerty]\n\n```bash\nnpx runnerty add @runnerty/executor-http\n```\n\nThis command installs the module in your project, adds example configuration in your [config.json] and creates an example plan of use.\n\nIf you have installed [runnerty] globally you can include the module with this command:\n\n```bash\nrunnerty add @runnerty/executor-http\n```\n\n### Configuration sample:\n\nAdd in [config.json]:\n\n```json\n{\n  \"id\": \"http_default\",\n  \"type\": \"@runnerty-executor-http\"\n}\n```\n\n### Plan sample:\n\nAdd in [plan.json]:\n\n```json\n{\n  \"id\": \"http_default\",\n  \"headers\": { \"User-Agent\": \"runnerty\" },\n  \"method\": \"get\",\n  \"url\": \"https://api.github.com/search/repositories\",\n  \"params\": { \"q\": \"runnerty\" },\n  \"responseType\": \"json\"\n}\n```\n\n```json\n{\n  \"id\": \"http_default\",\n  \"headers\": { \"User-Agent\": \"runnerty\" },\n  \"url\": \"http://www.sample.com/form\",\n  \"method\": \"post\",\n  \"data\": {\n    \"key1\": \"value1\",\n    \"key2\": \"value2\"\n  },\n  \"responseType\": \"json\",\n  \"withCredentials\": true\n}\n```\n\n```json\n{\n  \"id\": \"http_default\",\n  \"headers\": { \"User-Agent\": \"runnerty\" },\n  \"url\": \"http://www.sample.com/uploadfile\",\n  \"method\": \"post\",\n  \"files\": [\n    { \"name\": \"fileOne\", \"path\": \"/var/myfile.txt\" },\n    { \"name\": \"fileTwo\", \"path\": \"/var/www/runnerty.jpg\" }\n  ],\n  \"responseType\": \"json\",\n  \"returnHeaderDataOutput\": true\n}\n```\n\n```json\n{\n  \"id\": \"http_default\",\n  \"headers\": { \"User-Agent\": \"runnerty\", \"Content-Type\": \"application/xml\" },\n  \"method\": \"post\",\n  \"url\": \"https://sample.com/api-sample\",\n  \"auth\": {\n    \"username\": \"@GV(MY_USER_AUTH)\",\n    \"password\": \"@GV(MY_PASS_AUTH)\"\n  },\n  \"data\": \"@GV(SAMPLE_BODY)\"\n}\n```\n\n### Pagination:\n\nIt is possible to make calls to APIs that return `JSON` data that requires paging. The parameters available for paging are.\n\n| Parameter                      | Description                                                                                          |\n| ------------------------------ | ---------------------------------------------------------------------------------------------------- |\n| start                          | page from which the query is initiated, by default 1                                                 |\n| limit                          | maximum elements per page                                                                            |\n| pages                          | total pages to consult                                                                               |\n| total                          | total items for automatic page calculation                                                           |\n| total_from_header              | header from which to get the total of items for automatic page calculation                           |\n| total_from_response            | params path of the response data from which to get the total of items for automatic page calculation |\n| next_page_url_from_response    | params path of the response data from which to get the url for the next page                         |\n| token.query_param_name         | name of parameter to send in url query with token of next page                                       |\n| token.data_param_name          | name of the parameter to be sent in the body with the token of next page                             |\n| token.next_token_from_response | params path of the response data from which to get the next page token                               |\n| token.next_token_from_header   | params path of the header data from which to get the next page token                                 |\n\nSome paginations examples:\n\n```json\n{\n  \"id\": \"http_default\",\n  \"method\": \"get\",\n  \"url\": \"https://endpoint.sample.com/items\",\n  \"pagination\": {\n    \"limit\": \"2000\",\n    \"total_from_header\": \"x-total-items\"\n  },\n  \"responseType\": \"json\",\n  \"responseToFile\": \"/var/www/data/sample.json\",\n  \"noReturnDataOutput\": true\n}\n```\n\n```json\n{\n  \"id\": \"http_default\",\n  \"method\": \"get\",\n  \"url\": \"https://endpoint.sample.com/items\",\n  \"pagination\": {\n    \"limit\": \"2000\",\n    \"next_page_url_from_response\": \"paging.nextPage\"\n  },\n  \"responseType\": \"json\",\n  \"responseToFile\": \"/var/www/data/sample.json\",\n  \"noReturnDataOutput\": true\n}\n```\n\n```json\n{\n  \"id\": \"http_default\",\n  \"method\": \"get\",\n  \"url\": \"https://endpoint.sample.com/items\",\n  \"pagination\": {\n    \"limit\": \"2000\",\n    \"token\": {\n      \"next_token_from_response\": \"paging.continuationToken\",\n      \"query_param_name\": \"nextPageToken\"\n    }\n  },\n  \"responseType\": \"json\",\n  \"responseToFile\": \"/var/www/data/sample.json\",\n  \"noReturnDataOutput\": true\n}\n```\n\n### Output (Process values):\n\n- `PROCESS_EXEC_DATA_OUTPUT`: Response output data.\n  It is possible to return the header response in dataoutput by activating the `returnHeaderDataOutput (boolean)` parameter\n- `EXTRA_DATA`: If the response is a `JSON` it is possible to work with the parsed values of the response using the `\"responseType\": \"json\"` parameter. If we receive for example:\n\n```json\n{\n  \"planet\": {\n    \"name\": \"Mars\",\n    \"satellites\": [\n      {\n        \"name\": \"phobos\"\n      },\n      {\n        \"name\": \"deimos\"\n      }\n    ]\n  }\n}\n```\n\nIt is possible to access the values by ([GETVALUE] function):\n`PROCESS_EXEC_PLANET_NAME`: \"Mars\", `PROCESS_EXEC_PLANET_NAME_SATELLITES_1_NAME`:\"phobos\"\n\n- `PROCESS_EXEC_ERR_OUTPUT`: Error output message.\n\n### Other considerations\n\nIf 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.\n\n```json\n{\n  \"id\": \"http_default\",\n  \"headers\": { \"User-Agent\": \"runnerty\" },\n  \"method\": \"get\",\n  \"url\": \"http://host.com/big_file.zip\",\n  \"responseToFile\": \"/etc/runnerty/big_file.zip\",\n  \"noReturnDataOutput\": true\n}\n```\n\n[runnerty]: https://www.runnerty.io\n[downloads-image]: https://img.shields.io/npm/dm/@runnerty/executor-http.svg\n[npm-url]: https://www.npmjs.com/package/@runnerty/executor-http\n[npm-image]: https://img.shields.io/npm/v/@runnerty/executor-http.svg\n[david-badge]: https://david-dm.org/runnerty/executor-http.svg\n[david-badge-url]: https://david-dm.org/runnerty/executor-http\n[getvalue]: http://docs.runnerty.io/functions/\n[config.json]: http://docs.runnerty.io/config/\n[plan.json]: http://docs.runnerty.io/plan/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunnerty%2Fexecutor-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frunnerty%2Fexecutor-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunnerty%2Fexecutor-http/lists"}