调换序列化顺序
This commit is contained in:
@@ -637,7 +637,7 @@ impl WebSocketClient {
|
||||
/// Send a text message
|
||||
pub async fn send(&self, msg_type: &str, data: Value) -> Result<(), WebSocketError> {
|
||||
let message = WebSocketMessage::new(msg_type, data);
|
||||
let json = serde_json::to_string(&message)?;
|
||||
let json = message.to_json_string()?;
|
||||
self.send_raw_text(json).await
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user