Permalink
Browse files

Update WebSocketModule.java

Summary:
Convert to base64 not utf8

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes #15046

Differential Revision: D5451398

Pulled By: javache

fbshipit-source-id: b8c6c7b0fb50ca9558e92d3f63a088e343791b7f
  • Loading branch information...
sm2017 authored and facebook-github-bot committed Jul 19, 2017
1 parent c7a5965 commit 7e29b1fc7711a285765f021be3e83a981b066435
@@ -159,7 +159,7 @@ public void onMessage(WebSocket webSocket, String text) {
@Override
public void onMessage(WebSocket webSocket, ByteString bytes) {
String text = bytes.utf8();
String text = bytes.base64();
WritableMap params = Arguments.createMap();
params.putInt("id", id);
params.putString("data", text);

0 comments on commit 7e29b1f

Please sign in to comment.