Skip to content

Commit aa86e89

Browse files
authored
doc: update diagnostics channel request headers type change (#2925)
1 parent 03a2d43 commit aa86e89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/api/DiagnosticsChannel.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ diagnosticsChannel.channel('undici:request:create').subscribe(({ request }) => {
1919
console.log('completed', request.completed)
2020
console.log('method', request.method)
2121
console.log('path', request.path)
22-
console.log('headers') // raw text, e.g: 'bar: bar\r\n'
22+
console.log('headers') // array of strings, e.g: ['foo', 'bar']
2323
request.addHeader('hello', 'world')
24-
console.log('headers', request.headers) // e.g. 'bar: bar\r\nhello: world\r\n'
24+
console.log('headers', request.headers) // e.g. ['foo', 'bar', 'hello', 'world']
2525
})
2626
```
2727

0 commit comments

Comments
 (0)