如何在 linux shell 中读取 websocket 响应 [英] How to read websocket response in linux shell
本文介绍了如何在 linux shell 中读取 websocket 响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
编写 bash 脚本以连接到 wss://ws- 上的 GDAX 的 Websocket Feedfeed.gdax.com 但 curl 似乎不支持这一点,因为我得到 p>
Writing a bash script to connect to GDAX's Websocket Feed at wss://ws-feed.gdax.com but curl doesn't seem to support this as I get
curl "wss://ws-feed.gdax.com"
curl: (1) Protocol "wss" not supported or disabled in libcurl
推荐答案
好吧,您可以尝试使用 curl 模拟所需的标头以获得一些响应:
Well, you can try to mimic the required headers to get some response using curl:
此外,还有其他方式与 WebSocket 服务器通信,例如
Also, there are other ways to communicate with a WebSocket server, e.g.
- https://github.com/websockets/wscat
- https://github.com/bwasti/webpipe
- https://github.com/progrium/wssh
这篇关于如何在 linux shell 中读取 websocket 响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文