stomp-js / rx-stomp

STOMP adaptor for RxJS
Apache License 2.0
111 stars 21 forks source link

receive binary data #469

Closed jeme95 closed 1 year ago

jeme95 commented 1 year ago

I'm using RxStompRPC to send a zip file from the server (via RabbitMQ Server) to the client (browser), but I'm getting this error in the browser

WebSocket connection to 'ws://127.0.0.1:15674/ws' failed: Could not decode a text frame as UTF-8.

the zip file to be transferred is encoded in ANSI (Windows-1252)

so I deduced that the WebSocket is incorrectly trying to interpret the content as UTF-8 content.

Is there a way to configure the websocket to interpret the message content as ANSI encoding or even as binary data?

kum-deepak commented 1 year ago

Some general suggestions:

There is a test case that uses binary payload in an RPC call - https://github.com/stomp-js/rx-stomp/blob/develop/spec/unit/rpc.spec.ts#L80 - check that.

In case you need further assistance please paste the code fragment.