Trot.NotFound
Plug for inserting a 404 not found response.
Use this module or plug it in at the end of the plug system. If the connection has not been sent yet, it will be set to 404 with a not found message.
Example
defmodule WhereIsIt.Router do
use Trot.Router
get "/real", do: :ok
use Trot.NotFound
end
Summary↑
match(conn, opts) | When using |
not_found(conn) | See |
not_found(conn, opts) | Takes a Plug.Conn and sends a “not found” message to the requestor |
Functions
When using import_routes
, match/2
is used as the Plug function. Simply passes on to not_found/2
.
See not_found/2
.
Takes a Plug.Conn and sends a “not found” message to the requestor.