diff options
Diffstat (limited to 'node_modules/undici/docs')
| -rw-r--r-- | node_modules/undici/docs/docs/api/Errors.md | 1 | ||||
| -rw-r--r-- | node_modules/undici/docs/docs/api/WebSocket.md | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/node_modules/undici/docs/docs/api/Errors.md b/node_modules/undici/docs/docs/api/Errors.md index c328689..a6af44d 100644 --- a/node_modules/undici/docs/docs/api/Errors.md +++ b/node_modules/undici/docs/docs/api/Errors.md @@ -27,6 +27,7 @@ import { errors } from 'undici' | `InformationalError` | `UND_ERR_INFO` | expected error with reason | | `ResponseExceededMaxSizeError` | `UND_ERR_RES_EXCEEDED_MAX_SIZE` | response body exceed the max size allowed | | `SecureProxyConnectionError` | `UND_ERR_PRX_TLS` | tls connection to a proxy failed | +| `MessageSizeExceededError` | `UND_ERR_WS_MESSAGE_SIZE_EXCEEDED` | WebSocket decompressed message exceeded the maximum allowed size | ### `SocketError` diff --git a/node_modules/undici/docs/docs/api/WebSocket.md b/node_modules/undici/docs/docs/api/WebSocket.md index 9d374f4..8b6f7b9 100644 --- a/node_modules/undici/docs/docs/api/WebSocket.md +++ b/node_modules/undici/docs/docs/api/WebSocket.md @@ -13,6 +13,14 @@ Arguments: * **url** `URL | string` - The url's protocol *must* be `ws` or `wss`. * **protocol** `string | string[] | WebSocketInit` (optional) - Subprotocol(s) to request the server use, or a [`Dispatcher`](./Dispatcher.md). +### WebSocketInit + +When passing an object as the second argument, the following options are available: + +* **protocols** `string | string[]` (optional) - Subprotocol(s) to request the server use. +* **dispatcher** `Dispatcher` (optional) - A custom [`Dispatcher`](/docs/docs/api/Dispatcher.md) to use for the connection. +* **headers** `HeadersInit` (optional) - Custom headers to include in the WebSocket handshake request. + ### Example: This example will not work in browsers or other platforms that don't allow passing an object. |
