Hi, I'm using webstomp in Aurelia project, cause of possibility of .subscribe. In original repo .connect() accepts custom headers, like:
.connect({'Authorization': 'Bearer 123'})
In your 'index.d.ts' i see, that connect accepts only:
headers: ConnectionHeader
login: string, passcode: string
... before callback function, but ConnectionHeader interface contains only:
login: string; passcode: string; host?: string;
If I change it to any, Stomp sends request as ussualy with my custom header.
My example:
websocketConnect(){
var socket = new SockJS('https://my-rul');
var stompClient = Stomp.over(socket);
var token = `Bearer ${this.authService.getAccessToken()}`;
stompClient.connect({'Authorization' : token}, frame => {
stompClient.subscribe('/some-subchannel', msg => {
// ...
});
});
}
Hi, I'm using webstomp in Aurelia project, cause of possibility of .subscribe. In original repo
.connect()
accepts custom headers, like:.connect({'Authorization': 'Bearer 123'})
In your 'index.d.ts' i see, that
connect
accepts only:... before callback function, but
ConnectionHeader
interface contains only:login: string; passcode: string; host?: string;
If I change it toany
, Stomp sends request as ussualy with my custom header.My example: