Made a websocket server, I was wondering why you can't send non-stringified objects over the socket connection. I understand you can use JSON.stringify() but I am curious as to why the data gets turned into a Blob if you just send something like an array, and why it causes errors in the server if you try sending a key/value pair object.
Here's what the client receives in the event.data if the server sends a non-stringified array with 3 objects (relevant code is underneath): https://media.discordapp.net/attachments/559635624806580235/591322984199880715/unknown.png
Server code:
ws.send(['setup',1,2]);
Client code:
ws.addEventListener('message',function(e){
const data = e.data;
console.log(data);
});
So why do I get a Blob? And why specifically a Blob when using websockets? And are there any good resources which can teach me how websockets work?
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
I have using nodeJS and mongoose/mongoDB to build an APIConsider the following model for a generic Model (Gmodel):
I have to send Korean and Japanese values from rest api in a get requestwhen I am trying to fetch param in my node code ,I am getting different encoded value ,I need proper Korean value in my node code so that I can use it for other operation
I'm building an App which I use ReactJS to build my Client-side and Spring framework for my Server-side setupWhat I'm trying to archive is a way to store my ClientId, Client secret and OAuth token since I'm implementing OAuth2 Security on my Server-side
I have a folder inside src/images/original The nodejs script is inside the root directoryThe output should be src/images/processed