Can't upgrade request to websocket
I want to use a websocket in one of my middlewares.
But I keep getting an error saying I can't upgrade my connection:
I've googled this error but only find old results relating this error to the version of deno or oak lib where I run the latest deno (1.37.2) and oak (12.6.1).
9 Replies
Yes, that works but I'm trying to migrate to oak . I can't imagine what I am doing wrong as I am just following the documentation.
You just said: that works
Then: what I am doing wrong
I'm confused
I want to use oak
Just use it, there no OAK way, or Fresh Way to use WebSocket, just the Deno way: https://discord.com/channels/684898665143206084/1166876166741819452/1166888108231512085
Look, for some reason I keep having issues just running the example code.
if I run the example from the blog, I just added an explicit version number, it still doesn't work:
The code does not run past
if (!ctx.isUpgradable) ...
This happens on server startup, or when a client connects?
Oh, ok sorry I get it know, that error is normal if you don't connect with a websocket...