How to use project secret with wss?

I am using web3.WebsocketProvider for connecting with infura wss link with project secret enabled but it keeps giving me a connection error.
I was able to set it up using HttpProvider but wss does not work.
I am using the below format
new web3.providers.WebsocketProvider(‘wss://’, {
headers: { authorization: PROJECT-SECRET}
Can someone help with what exactly needs to be passed in order to get this working?

Hi @sid
With web3js you can pass it in the connection string, example:

new Web3.providers.WebsocketProvider("wss://")

With wscat you can pass the --auth flag, see

hope this helps.