mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
feat(ext/websocket): add header support to WebSocketStream (#11887)
This commit is contained in:
parent
c74eb7a889
commit
c40419b55b
4 changed files with 92 additions and 0 deletions
|
@ -39,6 +39,10 @@
|
|||
key: "signal",
|
||||
converter: webidl.converters.AbortSignal,
|
||||
},
|
||||
{
|
||||
key: "headers",
|
||||
converter: webidl.converters.HeadersInit,
|
||||
},
|
||||
],
|
||||
);
|
||||
webidl.converters.WebSocketCloseInfo = webidl.createDictionaryConverter(
|
||||
|
@ -139,6 +143,7 @@
|
|||
? ArrayPrototypeJoin(options.protocols, ", ")
|
||||
: "",
|
||||
cancelHandle: cancelRid,
|
||||
headers: [...new Headers(options.headers).entries()],
|
||||
}),
|
||||
(create) => {
|
||||
options.signal?.[remove](abort);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue