eview v0.16.0 EView
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
Link to this section 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.
Link to this section Functions
Callback implementation for Plug.call/2.
Link to this function
init(options)
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.