This commit adds support for specifying a `Deno.HttpClient` in the
`client` field of the `WebSocketOptions` bag. This mirrors how users
pass a custom HTTP client to `fetch`.
Additionally the underlying connection for websockets are now
established through the same mechanism used for `fetch`, which
means that `WebSocket` now correctly uses HTTP proxies, like
when configuring the `HTTP_PROXY` env var.
---------
Signed-off-by: Luca Casonato <hello@lcas.dev>
This changes the second argument in the WebSocket constructor to be able
to take an object, which can contain a headers field with which the
headers for the connection can be set.
---------
Co-authored-by: Luca Casonato <hello@lcas.dev>
This commits moves all `.d.ts` files from `ext/*` to `cli/tsc/dts`.
Due to TSC snapshot removal, `cargo publish` is now erroring out,
unable to find the declaration files. These files were moved to
"cli/tsc/dts", because it's much easier than keeping them in
extension directories, while still providing them compressed
or uncompressed depending on the build type.
2025-02-19 02:53:21 +01:00
Renamed from ext/websocket/lib.deno_websocket.d.ts (Browse further)