← All recipes
Moderne licensed

Replace OutgoingMessage._headers and ._headerNames with public methods

Recipe IDorg.openrewrite.node.migrate.http.replace-outgoing-message-headersArtifact@openrewrite/recipes-nodejs

Replace deprecated OutgoingMessage.prototype._headers with getHeaders(), setHeader(), removeHeader() and OutgoingMessage.prototype._headerNames with getHeaderNames() to address DEP0066 deprecation.

Single recipeDEP0066Proprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.node.migrate.http.replace-outgoing-message-headers

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-nodejs