@keload/node-red-contrib-happy-http-client 2.0.1
Fresh way to manage HTTP requests
node-red-contrib-happy-http-client
A highly flexible and customizable Node-RED node designed to simplify your HTTP requests. Create and manage clients, parameterize everything, and handle errors effortlessly. 🛠️
📦 Installation
npm install @keload/node-red-contrib-happy-http-client
Or from the Node-RED editor: Menu → Manage palette → Install, then search for @keload/node-red-contrib-happy-http-client.
⚡ Quick Start
- Drop a Happy Config node on the canvas (optional) and set a
Base URL, e.g.https://api.example.com/v1. - Drop a Happy Request node, pick that config as its
Client, and setEndpointto/users/42. - Deploy and send it a message — the node makes the request and returns:
msg.payload // response body
msg.happyRequest.ok // true for 2xx responses
msg.happyRequest.response.status // HTTP status code
No config node required — set a full URL directly as the Endpoint for one-off requests.
Features
Flexible Client Management
Create reusable HTTP clients (Happy Config nodes) to store a base URL, default headers, auth, and timeouts once, then reuse them across as many Happy Request nodes as needed — or skip the client entirely for ad-hoc calls.

Full Parameterization
URL, headers, query params, and body all accept a static value, a msg/flow/global property, an environment variable, or a JSONata expression.

🧩 Scripting: Before Request & Transform Response
Add optional JavaScript directly in the node, with a full code editor (syntax highlighting, expandable to full screen) — the same editor Node-RED's core Function node uses.
- Before Request (Request tab): runs just before the call is made. Receives
(request, msg, node)and can mutate or return{ url, method, headers, queryParams, body, bodyContentType }to override the resolved request. - Transform Response (Response tab): runs after the response is built. Receives
(msg, node)and must return themsgto send onward — reshape the payload, add fields, whatever you need.
Both are optional — leave them empty and the node behaves exactly as before. Either one can return a Promise. If a script throws, the node reports an error and nothing is sent, so failures never pass silently.
Authentication
Basic, Bearer, or Digest — configure once on the client and inherit it everywhere, or override it per request.

Advanced Error Handling & Dual Outputs
Choose whether the node throws on non-2xx responses, and optionally split successes and errors into two separate outputs for explicit branching in your flow.

TLS
Toggle certificate verification (rejectUnauthorized) per client or per request.
Built with urllib
Powered by urllib for reliable, high-performance HTTP under the hood.
Contributing & Developer Experience
This package is built with node-red-dxp and written in TypeScript, keeping the codebase structured and easy to extend.
Issues, pull requests, and ideas are welcome — see CHANGELOG.md for recent changes.
License
MIT