-
-
Notifications
You must be signed in to change notification settings - Fork 689
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
Looks like addHeader was removed in https://github.com/nodejs/undici/pull/3024/files. The New Relic Node.js agent relies on this to propagate headers in our instrumentation.
Reproducible By
const requestHooks = diagnosticsChannel.channel('undici:request:create')
requestHook.subscribe(function requestCreate({ request }) {
request.addHeader('test-header', 'value')
})Expected Behavior
Adds test-header with value of value
Logs & Screenshots
TypeError: request.addHeader is not a function
at addDTHeaders (undici.js:104:13)
at requestCreateHook (undici.js:162:5)
at Channel.publish (node:diagnostics_channel:142:9)
at new Request (request.js:192:23)
at Client.[dispatch] (client.js:304:21)
at Intercept (redirect-interceptor.js:11:16)
at Client.[Intercepted Dispatch] (dispatcher-base.js:158:12)
at Client.dispatch (dispatcher-base.js:179:40)
at Pool.[dispatch] (pool-base.js:143:28)Environment
Any, undici 6.11.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working