reqwest icon indicating copy to clipboard operation
reqwest copied to clipboard

WebSocket support

Open silvioprog opened this issue 5 years ago • 20 comments

We love reqwest, but we also need to use websocket. :-)

Warp implements it at server-side, so it would be nice if reqwest could implement it at client-side allowing we to reuse all other features (e.g: TLS support) present in reqwest.

Cheers

silvioprog avatar Mar 26 '20 22:03 silvioprog

Curious, why would you use websockets outside a browser context?

seanmonstar avatar Mar 26 '20 22:03 seanmonstar

Some cryptocurrency exchange provide websocket API! ex. https://docs.pro.coinbase.com/#websocket-feed https://www.bitstamp.net/websocket/v2/ https://docs.kraken.com/websockets/

I'm using ws-rs, but it's not support async/await. It would be great if reqwest can support websocket!

x1957 avatar Mar 27 '20 14:03 x1957

Curious, why would you use websockets outside a browser context?

At the company, we are going to use websocket specially for sales terminal(s) monitoring, but there are many other features which websockets are useful outside a web browser, like real time gaming, embedded system remote control, industrial machine full-duplex communication via dedicated boards like STM32 and so on.

silvioprog avatar Mar 28 '20 13:03 silvioprog

Another use-case, the Kubernetes API server exposes a bunch of streaming stuff (e.g exec, port-forward) over websockets.

alexjg avatar Apr 18 '20 12:04 alexjg

Is there any plan for support WebSockets ?

redradist avatar May 14 '20 12:05 redradist

Curious, why would you use websockets outside a browser context?

I need websockets for integration testing.

Yoric avatar Jan 11 '21 19:01 Yoric

It would be nice if reqwest supported websockets to allow reverse proxying of servers using websockets with something like https://crates.io/crates/warp-reverse-proxy like go reverse proxy does.

nicolaspernoud avatar Nov 13 '21 12:11 nicolaspernoud

Given that reqwest is building support for WebAssembly for use in web context, supporting websockets in wasm could be a great ergonomics improvement over using web-sys manually.

sgued avatar May 06 '22 12:05 sgued

Curious, why would you use websockets outside a browser context?

An other data point: Chrome's DevTools protocol uses bidirectional websockets as its baseline transport.

It also supports custom pipes but that's not really easy to do in rust, and obviously only works when the controller is also the creator of the chrome instance.

xmo-odoo avatar Jul 20 '22 07:07 xmo-odoo

Curious, why would you use websockets outside a browser context?

I'm building a client side application which needs to maintain an established connection with a web server so the web server can periodically send some instructions back to the client machine. Doing this with websockes would greatly improve the experience.

evklein avatar Aug 16 '22 11:08 evklein

Curious, why would you use websockets outside a browser context?

Like the above, I'm building an embedded client application, controlled remotely via events from another app. One can send commands there that are fetched by the client machines, but instead of polling every 5 or so seconds to see if there's any new event, I'd like to use websockets for faster delivery and near real-time processing.

rsalmei avatar Oct 17 '22 23:10 rsalmei