@keload/node-red-contrib-happy-http-client 2.0.1

Fresh way to manage HTTP requests

npm install @keload/node-red-contrib-happy-http-client

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. 🛠️


Build with node-red-dxp

Contributors Forks Stargazers Issues

NPM Version NPM Downloads

📦 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

  1. Drop a Happy Config node on the canvas (optional) and set a Base URL, e.g. https://api.example.com/v1.
  2. Drop a Happy Request node, pick that config as its Client, and set Endpoint to /users/42.
  3. 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.

Client configuration

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.

Typed input options

🧩 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 the msg to 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.

Before Request scripting Transform Response scripting

Authentication

Basic, Bearer, or Digest — configure once on the client and inherit it everywhere, or override it per request.

Auth configuration

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.

Dual outputs

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

Node Info

Version: 2.0.1
Updated 2 weeks, 1 day ago
License: MIT
Rating: 5.0 1

Categories

Actions

Rate:

Downloads

153 in the last week

Keywords

  • node-red
  • node-red-contrib
  • node-red-dxp
  • http
  • request

Maintainers