Quenya.Plug.RoutePlug (Quenya v0.2.0) View Source
Plug for executing a route. To use it:
get "/todo/:todoId", to: Quenya.Plug.RoutePlug, init_opts: [
preprocessors: [RequestValidatorPlug],
postprocessors: [ResponseValidatorPlug],
handlers: [RouteHandler]
])
Note this plug shall be used after Plug.Parsers since it will access request body (if any)
Options
:preprocessors
- a list of plug, execute in order before executing handlers:handlers
- a list of plug to process request and generate response:postprocessors
- a list of plug that will be executed in order before send
Link to this section Summary
Link to this section Functions
Specs
call(Plug.Conn.t(), keyword()) :: Plug.Conn.t()
Callback implementation for Plug.call/2
.
Specs
Callback implementation for Plug.init/1
.