Skip to content

Repository files navigation

built with nrg NPM Version build status socket badge codecov

@bonsae/node-red-http

HTTP nodes for Node-RED, built with @bonsae/nrg on the platform-native fetch API — no request, axios, or body-parser dependency. Their config surfaces mirror Node-RED's core http request / http in / http response nodes, so a flow author migrating over sees the same knobs.

Nodes

Node Description
HTTP Request Make outbound HTTP requests with native fetch — method, mustache URL, auth, return type; merges the response fields onto the message record
HTTP In Listen on a path of Node-RED's HTTP server and emit one message per incoming request
HTTP Out Write the reply back on the live socket for a request started by HTTP In

Prerequisites

Installation

Install into the directory that holds your Node-RED package.json (usually ~/.node-red):

npm install @bonsae/node-red-http

Everything the nodes need is pulled in automatically. Restart Node-RED after installing; the three nodes then appear under the network category (HTTP request, HTTP in, HTTP out) in the palette.

Development

pnpm install
pnpm build      # bundles the nodes into dist/
pnpm dev        # boots a Node-RED editor with the nodes loaded

pnpm validate                  # tsc (server/client/tests) + eslint + prettier
pnpm test                      # server unit + integration (real HTTP round-trip)
pnpm test:server:unit
pnpm test:server:integration

Locales

Labels and auto-generated help docs are available in:

  • English (en-US)
  • German (de)
  • Spanish (es-ES)
  • French (fr)
  • Japanese (ja)
  • Korean (ko)
  • Portuguese (pt-BR)
  • Russian (ru)
  • Chinese Simplified (zh-CN)
  • Chinese Traditional (zh-TW)

License

MIT © Allan Oricil

Releases

Contributors

Languages