Skip to content

Commit

Permalink
doc: update diagnostics channel request headers type change (nodejs#2925
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jessezhang91 authored and tsctx committed Mar 8, 2024
1 parent ee6e99f commit 4ee932a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/docs/api/DiagnosticsChannel.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ diagnosticsChannel.channel('undici:request:create').subscribe(({ request }) => {
console.log('completed', request.completed)
console.log('method', request.method)
console.log('path', request.path)
console.log('headers') // raw text, e.g: 'bar: bar\r\n'
console.log('headers') // array of strings, e.g: ['foo', 'bar']
request.addHeader('hello', 'world')
console.log('headers', request.headers) // e.g. 'bar: bar\r\nhello: world\r\n'
console.log('headers', request.headers) // e.g. ['foo', 'bar', 'hello', 'world']
})
```

Expand Down

0 comments on commit 4ee932a

Please sign in to comment.