-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Labels
bugSomething isn't working correctlySomething isn't working correctlynode APIRelated to various "node:*" modules APIsRelated to various "node:*" modules APIsnode compatnode:httpIssues with `node:http` module - to be fixed with a rewriteIssues with `node:http` module - to be fixed with a rewrite
Description
import tls from 'node:tls'
import https from 'node:https'
import net from 'node:net'
function tlsConnect(options) {
options.path = undefined;
if (!options.servername && options.servername !== '') {
options.servername = net.isIP(options.host) ? '' : options.host;
}
return tls.connect(options);
}
const opts = {
protocolVersion: 13,
maxPayload: 104857600,
skipUTF8Validation: false,
perMessageDeflate: true,
followRedirects: false,
maxRedirects: 10,
handshakeTimeout: 30000,
createConnection: tlsConnect,
socketPath: undefined,
hostname: undefined,
protocol: undefined,
timeout: 30000,
method: "GET",
host: "gateway.discord.gg",
path: "/?v=10&encoding=json",
port: 443,
defaultPort: 443,
headers: {
Connection: "Upgrade",
Upgrade: "websocket",
"Sec-WebSocket-Extensions": "permessage-deflate; client_max_window_bits"
}
}
https.request(opts)I've had an issue on DiscordJS with deno. Whenever I run this code I am getting this issue below.

jespertheend, pje, Abdillah, Ayfri, livthomas and 15 moreMrowa96, 3raser95, ghostzero, pje, proudust and 3 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't working correctlySomething isn't working correctlynode APIRelated to various "node:*" modules APIsRelated to various "node:*" modules APIsnode compatnode:httpIssues with `node:http` module - to be fixed with a rewriteIssues with `node:http` module - to be fixed with a rewrite