Content Negotiation Using Plug

Assuming that it is needed to use only Plug - and not Phoenix:

What is the idiomatic way to implement content negotiation using plug?

All the content I could find, was about Phoenix.

I’d reverse engineer it from the way Phoenix is doing it for Phoenix.Controller.accepts/2 (source).

MDN: Content Negotiation

1 Like