Elixir is taking over! 5 Elixir Meetups behind us - check how was it! Showing how to use LiveView with Nerves

Read raw request body from Plug.Conn after parsers

If you ever tried to use Plug.Conn.read_body/2 and it returned nil, you now know that it can only be used once. If you have :json in your Plug.Parsers, you cannot read the raw body again, because it was already used by the parser. That’s a trick Plug does to save memory as request bodies can be of any size. However there’s a way to cache the raw body when you need it:

Read more: https://vinibrasil.com/plugrawbody