将websocket连接到wss://earth.comismart.com/api/websocket,并将两个数据发送到服务器
{
"action": "authenticate",
"token": {accessToken}
}
{
"action": "notification/subscribe",
"deviceId": "1540281688669",
"names": ["measurements"]
}
{accessToken}是eyJhbGciOiJIUzI1NiJ9.eyJwYXlsb2FkIjp7ImEiOlsyLDMsNCw1LDYsNyw4LDksMTAsMTEsMTUsMTcsMTldLCJlIjoxNTQ4NzM2OTEyNzUyLCJ0IjoxLCJ1Ijo0LCJuIjpbIjEiLCI2Il0sImR0IjpbIioiXX19.Y6jRHIQItUwnFXhVVwcI4rtYBxZprK-BrKABwELWDx0
How can I get Response Like this
代替下面的响应数据(这是我得到的response.data)
“ {” action“:” authenticate“,” requestId“:null,” status“:” success“}”