EView (eview2 v0.15.1)

This plug will take body_params from Plug.Conn structure and re-render it with appropriate structure to resp_body.

What is appropriate structure? Take look at Nebo #15 API Manifest.

Example:

Add to your endpoint.ex before Plug.Parsers plug:

  plug EView
  plug EView.Plugs.Idempotency

Summary

Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.

Update body and add all meta objects that is required by API Manifest structure.

Functions

Link to this function

call(conn, options)

@spec call(Conn.t(), any()) :: Conn.t()

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.

Link to this function

put_response(conn, resp_body)

Link to this function

wrap_body(body, conn)

Update body and add all meta objects that is required by API Manifest structure.