Last active
June 28, 2019 03:29
-
-
Save chunhunghan/d0ac833a6f4f61dd522c8997d8e4f581 to your computer and use it in GitHub Desktop.
Flutter : WebSocket connect with headers https://qiita.com/n-luan/items/e81870598e7598ee415b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| channel = new IOWebSocketChannel.connect(socketUrl, headers: { | |
| "UID": auth.uid, | |
| "ACCESS_TOKEN": auth.accessToken, | |
| "CLIENT_ID": auth.clientId | |
| }); | |
| channel.sink.add(json.encode({ | |
| "command": "subscribe", | |
| "identifier": "{\"channel\":\"RoomChannel\"}" | |
| })); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment