Light my Request is a fake HTTP injection library for Node.js, used to inject a simulated request and response into a Node HTTP server for simulating server logic, writing tests, or debugging. It does not use a socket connection, so it can run against an inactive server (server not in listen mode), and it supports callbacks, async/await, and promises.
Project status
- Actively maintained: The most recent upstream push was 2026-10-10, and the v6.8.0 updates added new helper/API behavior (
bindInject) plus improved cookie/header handling and extra request/response annotations. - Update cadence: After earlier releases in late 2024 to early 2025, there was a long gap, with the next shown update moving from v6.6.0 (2025-02-17) to v6.8.0 (2026-10-10), suggesting a bursty cadence rather than continuous monthly updates.
AI summary generated
Recent updates
v6.8.0
v6.8.0 adds a new `bindInject` helper for creating inject functions with merged default options, and improves cookie and header handling to better match real Node.js HTTP behavior. It also annotates generated `Request` and `Response` objects with `isLightMyRequest` for easier inspection. Finally, the release includes multiple CI and dependency maintenance changes.
Featuresv6.6.0
v6.6.0 includes small documentation and CI housekeeping updates, plus an internal request-stream handling change. The main functional change is adding a transfer-encoding header for streaming payloads, along with a small refactor in the stream reader helpers.
v6.5.1
v6.5.1 focuses on fixing stream backpressure behavior. When using payloadAsStream mode, the library now emits the Response 'drain' event when backpressure is encountered so callers can coordinate writing and ending correctly.
v6.5.0
v6.5.0 primarily introduces proper backpressure behavior when streaming payloads, and includes small code quality/performance refactors (optional chaining, underscore for unused parameters). It also updates package metadata (funding and contributors).
Featuresv6.4.0
v6.4.0 adds improved support for streaming request payloads, including special handling for older or non-standard stream implementations. The release notes also document a set of development and CI-related updates, such as moving tests to node:test and bumping a few dev dependencies.
Featuresv6.3.0
This release adds support for using the HTTP method "QUERY" (and the lowercase alias "query") with light-my-request. The change is validated at the configuration level and covered by new unit tests.
Featuresv6.2.0
v6.2.0 adds a new `payloadAsStream` option to `inject`, enabling streaming of the server response payload instead of buffering it. It also includes a small internal refactor to use `Object.hasOwn()` and updates a couple of dependencies (cookie major bump to 1.x, plus `@types/node` dev dependency).
Featuresv6.1.0
v6.1.0 primarily updates the cookie handling dependency. The checked-in code diff shows no functional logic changes, but there are multiple dependency version bumps and coverage-instrumentation directive changes.
v5.14.0
v5.14.0 primarily updates the dependency tree. The only functional change visible in the diff is bumping the `cookie` package from `^0.6.0` to `^0.7.0`, along with the package version field being updated to `5.14.0`.
v6.0.0
Release v6.0.0 contains no substantive code logic changes in the diff provided, with most application changes limited to coverage directive rewrites (istanbul to c8) and formatting-only edits. The main notable functional change visible from package.json is a dependency upgrade, including a major bump of process-warning, while release notes only mention a merge of the next branch into master.
v5.13.0
v5.13.0 adds a new `res.stream()` API to obtain a Node.js Readable stream of the injected response payload. It also extends request handling to support `FormData` inputs by converting them into a `multipart/form-data` stream.
Features