jswanner
ReqWebSocket - Req plugin adding WebSocket support
I’ve release ReqWebSocket, a Req plugin for establishing WebSocket connections, using Mint.WebSocket.
resp =
Req.new(connect_options: [protocols: [:http1]], into: :self)
|> ReqWebSocket.attach()
|> Req.get!(url: "wss://echo.websocket.org/")
{:ok, resp, [text: _text]} = ReqWebSocket.parse_message(resp, receive do m -> m end)
{:ok, resp} = ReqWebSocket.send_frame(resp, :ping)
{:ok, resp, [pong: ""]} = ReqWebSocket.parse_message(resp, receive do m -> m end)
The main benefits I see with using a Req plugin for making WebSocket requests have to do with being able to use Req’s request, response, and error steps for things like settings headers, following redirects, and performing retries. In addition to that, this library adds some conveniences regarding decoding & encoding WebSocket frames.
Popular in Announcing
Hello!
tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability.
After spen...
New
I am pleased to announce an initial release of the Membrane Framework - an Elixir-based framework with special focus on processing multim...
New
This is a new extension for the Ash framework that lets you use the Commanded library in a more declarative manner and removes most of th...
New
An application wishing to store larger amounts of data typically has two options for doing so:
A new column on some table can be introd...
New
It is library created by me and @abc3. It is simple client for DuckDB, but with small twist when compared with other libraries out there ...
New
Hi everyone, at Doofinder we have been building llm_composer for some new apps, and we thought it could be useful to share it with the co...
New
Hello Elixir community,
I’ve written a small embedded key-value database in Elixir called Goblin. It’s based on the Log-Structured Merge...
New
WebAuthnLiveComponent WebAuthnComponents
See this post about renaming the package.
Passwordless authentication for Phoenix LiveView app...
New
Hello Elixir community! :wave:
I’m excited to announce the first release of ReqCassette, a VCR-style record-and-replay library specifica...
New
Hello
Published a new library - ProcessHub!
ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
Other popular topics
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Hi! May someone helps me, please!
I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
Hello!
Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode.
The solution seems to be, in a hyphena...
New
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
I have a User schema with a :from_id field set to type :string:
defmodule TweetBot.Repo.Migrations.CreateUsers do
use Ecto.Migration
...
New
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New








