JSteunou / webstomp-client

Stomp client over websocket for browsers
Apache License 2.0
299 stars 59 forks source link

connect with error callback #82

Closed dev-jonghoonpark closed 5 years ago

dev-jonghoonpark commented 5 years ago

how can I connect with error callback?

without error callback, it work well.

stompClient.connect({}, function (frame) {
   console.log(frame);
})

but, when I add error callback

stompClient.connect({}, function (frame) {
   console.log(frame);
}, function (error) {
  console.log(error);
});

this. code make this error

org.springframework.messaging.simp.stomp.StompConversionException: Illegal header: '        console.log(frame);'. A header must be of the form <name>:[<value>].

there is something wrong? why connectCallback is sent as headers?

in documentation, connect(headers, connectCallback, errorCallback) is exist.

thanks