ewebmachine v2.1.2 Ewebmachine.Plug.Run
Plug passing your conn through the HTTP decision tree
to fill its status and response.
This plug does not send the HTTP result, instead the conn
result of this plug must be sent with the plug
Ewebmachine.Plug.Send. This is useful to customize the Ewebmachine result
after the run, for instance to customize the error body (void by default).
- Decisions are make according to handlers set in
conn.private[:resource_handlers](%{handler_name: handler_module}) wherehandler_nameis one of the handler function ofEwebmachine.Handlersandhandler_moduleis the module implementing it. Initial user state (second parameter of handler function) is taken from
conn.private[:machine_init]Ewebmachine.Builder.Handlers:add_handlerplug allows you to set these parameters in order to use this Plug.A successfull run will reset the resource handlers and initial state.