Custom dispatch options in Phoenix using cowboy 2.x

I have found instructions for adding custom dispatch handlers into a phoenix application.

Now that phoenix supports cowboy 2.0 is there a way to do this for cowboy 2.0. Specifically I want to add some custom handlers that are cowboy stream handlers.

This might be a question more for the phoenix team. @chrismccord or perhaps @Gazler?


You can pass stream_handlers as an option. Dispatch works the same way as it did with Cowboy 1:

Here’s a test that uses stream_handlers