Closed filip8703 closed 1 year ago
Try to use headers (plural):
const subscribeOpts = {
ack: 'auto', // client-individual or auto (default)
headers: { id: idToSubscribeTo }
}
@walterwanderley Thanks alot! Just missed the plural.. sorry for disturbing :)
Hi,
I cannot figure out from the examples if it is possible to add headers on client.subscribe(). I have the following code;
I have tried to add
header: { id: idToSubscribeTo }
in the subscibeOpts object but that won't work. Is it supported in the library to add headers to the subscribe function?I have verified that it is connecting to my websocket and subscribes to /user/notify/orderReservation that i have set up but it doesn't append the headers.
Thanks in advance!