Hi, for some reason @minecraft/server-net you can pass a HttpHeader in the websocket.connect()
so when I do it:
new HttpHeader("Authorization", "j")
]);```
it throws up an error: ```[2026-05-29 17:43:05:650 ERROR] [Scripting] [New Project] Unhandled promise rejection: TypeError: Incorrect number of arguments to function. Expected 1, received 2 at setup (main.js:15)```
based on the error saying you can't pass in a HttpHeader but, in the docs says you can: ```export class WebSocket {
private constructor();
/**
* @remarks
* Attempts to connect a WebSocket client.
*
* This function can't be called in restricted-execution mode.
*
* @param uri
* URL to make connection to.
* @returns
* An awaitable promise that contains the WebSocket client that
* was connected.
*/
connect(uri: string, headers?: HttpHeader[]): Promise<WebSocketClient>;
}
free to ping me : D thank you for your time