Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/docs/api/WebSocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Arguments:

This example will not work in browsers or other platforms that don't allow passing an object.

```mjs
```js
import { WebSocket, ProxyAgent } from 'undici'

const proxyAgent = new ProxyAgent('my.proxy.server')
Expand All @@ -28,7 +28,7 @@ const ws = new WebSocket('wss://echo.websocket.events', {

If you do not need a custom Dispatcher, it's recommended to use the following pattern:

```mjs
```js
import { WebSocket } from 'undici'

const ws = new WebSocket('wss://echo.websocket.events', ['echo', 'chat'])
Expand All @@ -44,7 +44,7 @@ const ws = new WebSocket('wss://echo.websocket.events', ['echo', 'chat'])

This example will not work in browsers or other platforms that don't allow passing an object.

```mjs
```js
import { Agent } from 'undici'

const agent = new Agent({ allowH2: true })
Expand Down
Loading