get request returns unexpected response #5429
Answered
by
darrachequesne
monamana9000
asked this question in
Q&A
-
|
I am running an engine io server on port 3000: import { createServer } from "node:http";
import { Server } from "engine.io";
const EMIT_INTERVAL_MS = 10_000;
const PACKETS_COUNT = 100;
const PACKET_SIZE = 100;
const httpServer = createServer();
const engine = new Server();
engine.attach(httpServer);
const packets = [];
for (let i = 0; i < PACKETS_COUNT; i++) {
packets.push("a".repeat(PACKET_SIZE));
}
setInterval(() => {
Object.keys(engine.clients).forEach((id) => {
const client = engine.clients[id];
packets.forEach((packet) => {
client.send(packet);
});
});
}, EMIT_INTERVAL_MS);
function formatSize(val) {
return Math.floor(val / 1024);
}
setInterval(() => {
const mem = process.memoryUsage();
console.log(
`${Math.floor(process.uptime())}; ${formatSize(mem.heapUsed)}; ${formatSize(
mem.heapTotal
)}`
);
}, 1000);
httpServer.listen(3000);when I submit a get request on the server: the engine io docs say I should get back a response which looks something like: {
"sid": "lv_VI97HAXpY6yYWAAAC",
"upgrades": ["websocket"],
"pingInterval": 25000,
"pingTimeout": 20000,
"maxPayload": 1000000
}so what could possibly be wrong? |
Beta Was this translation helpful? Give feedback.
Answered by
darrachequesne
Dec 22, 2025
Replies: 1 comment 4 replies
-
|
Hi! I was not able to reproduce the issue with the code you provided:
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Oh, I see! You need to quote the URL:
curl "http://127.0.0.1:3000/engine.io/?EIO=4&transport=polling"